Skip to content

Commit

Permalink
Fix tests after NeverWiringFactory revert
Browse files Browse the repository at this point in the history
  • Loading branch information
gnawf committed Jan 2, 2025
1 parent a149b90 commit b7e6773
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package graphql.nadel.tests.hooks

import graphql.nadel.Nadel
import graphql.nadel.tests.EngineTestHook
import graphql.nadel.tests.GatewaySchemaWiringFactory
import graphql.nadel.tests.UseHook
import graphql.schema.idl.WiringFactory
import java.io.File

interface GatewayScalarEngineHook : EngineTestHook {
override fun makeNadel(builder: Nadel.Builder): Nadel.Builder {
return super.makeNadel(builder)
.overallWiringFactory(GatewaySchemaWiringFactory())
.underlyingWiringFactory(GatewaySchemaWiringFactory())
}
override val wiringFactory: WiringFactory
get() = GatewaySchemaWiringFactory()
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package graphql.nadel.tests.legacy.scalars

import graphql.nadel.NadelSchemas
import graphql.nadel.tests.GatewaySchemaWiringFactory
import graphql.nadel.tests.legacy.NadelLegacyIntegrationTest
import graphql.scalars.ExtendedScalars
import graphql.scalars.alias.AliasedScalar
Expand Down Expand Up @@ -58,6 +60,12 @@ class `date time scalar as input type` : NadelLegacyIntegrationTest(
),
),
) {
override fun makeNadelSchemas(): NadelSchemas.Builder {
return super.makeNadelSchemas()
.overallWiringFactory(GatewaySchemaWiringFactory())
.underlyingWiringFactory(GatewaySchemaWiringFactory())
}

private data class Service_Foo(
val thing: Any? = null,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ response: |-
{
"data": {
"test": {
"extensions": {}
"extensions": [
{}
]
}
},
"extensions": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,12 @@ serviceCalls:
"data": {
"names": [
{
"__typename": "Issue",
"name": "GQLGW-001"
},
{
"__typename": "Issue",
"name": "GQLGW-1102"
},
{
"__typename": "Edible",
"name": "Spaghetti"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ serviceCalls:
"data": {
"names": [
{
"__typename": "Issue",
"name": "GQLGW-001"
},
{
"__typename": "Issue",
"name": "GQLGW-1102"
},
{
Expand All @@ -120,7 +118,6 @@ serviceCalls:
}
},
{
"__typename": "Edible",
"name": "Spaghetti"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ serviceCalls:
"data": {
"names": [
{
"__typename": "Issue",
"name": "GQLGW-001"
},
{
"__typename": "Issue",
"name": "GQLGW-1102"
},
{
Expand All @@ -124,7 +122,6 @@ serviceCalls:
}
},
{
"__typename": "Edible",
"name": "Spaghetti"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ serviceCalls:
"data": {
"names": [
{
"__typename" : "Issue",
"name": "GQLGW-001"
},
{
"__typename" : "Issue",
"name": "GQLGW-1102"
},
{
Expand All @@ -124,7 +122,6 @@ serviceCalls:
}
},
{
"__typename" : "Edible",
"name": "Spaghetti"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,14 @@ serviceCalls:
"data": {
"pets": [
{
"__typename": "Dog",
"name": "Sparky",
"collar": {
"__typename": "DogCollar",
"color": "blue"
}
},
{
"__typename": "Cat",
"name": "Whiskers",
"collar": {
"__typename": "CatCollar",
"color": "red"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,13 @@ serviceCalls:
{
"name": "Sparky",
"rename__collarToRenamed__collar": {
"__typename": "DogCollar",
"color": "blue"
},
"__typename__rename__collarToRenamed": "Dog"
},
{
"name": "Whiskers",
"rename__collarToRenamed__collar": {
"__typename": "CatCollar",
"color": "red"
},
"__typename__rename__collarToRenamed": "Cat"
Expand Down

0 comments on commit b7e6773

Please sign in to comment.