@@ -328,7 +328,7 @@ class UnmappedInputFieldsTest {
328328 }
329329
330330 @Test
331- fun `arguments are matched to their parameters past sources, environments and continuations` () {
331+ fun `arguments are matched to their parameters past sources, environments and continuations, and through type variables ` () {
332332 val error = assertThrows(SchemaError ::class .java) {
333333 SchemaParser .newParser()
334334 .schemaString(
@@ -337,6 +337,7 @@ class UnmappedInputFieldsTest {
337337 owner: Owner
338338 withEnvironment(input: EnvironmentInput!): String
339339 suspending(input: SuspendInput!): String
340+ generic(input: GenericInput!): String
340341 }
341342
342343 type Owner {
@@ -354,6 +355,10 @@ class UnmappedInputFieldsTest {
354355 input ChildInput {
355356 name: String
356357 }
358+
359+ input GenericInput {
360+ name: String
361+ }
357362 """ )
358363 .resolvers(object : GraphQLQueryResolver {
359364 fun owner (): Owner = Owner ()
@@ -362,7 +367,7 @@ class UnmappedInputFieldsTest {
362367 suspend fun suspending (input : SuspendInput ): String? = input.nmae
363368 }, object : GraphQLResolver <Owner > {
364369 fun child (owner : Owner , id : String , input : ChildInput ): String? = input.nmae
365- })
370+ }, GenericInputResolver () )
366371 .options(failOptions().build())
367372 .build()
368373 .makeExecutableSchema()
@@ -371,7 +376,8 @@ class UnmappedInputFieldsTest {
371376 assertEquals(error.message, listOf (
372377 unmapped(" ChildInput.name" , ChildInput ::class .java, " argument 'input' of field 'Owner.child'" , " nmae" ),
373378 unmapped(" EnvironmentInput.name" , EnvironmentInput ::class .java, " argument 'input' of field 'Query.withEnvironment'" , " nmae" ),
374- unmapped(" SuspendInput.name" , SuspendInput ::class .java, " argument 'input' of field 'Query.suspending'" , " nmae" )
379+ unmapped(" SuspendInput.name" , SuspendInput ::class .java, " argument 'input' of field 'Query.suspending'" , " nmae" ),
380+ unmapped(" GenericInput.name" , GenericInput ::class .java, " argument 'input' of field 'Query.generic'" , " nmae" )
375381 ).joinToString(" \n " ))
376382 }
377383
@@ -690,7 +696,6 @@ class UnmappedInputFieldsTest {
690696 injected(input: InjectedInput!): String
691697 builder(input: BuilderTypoInput!): String
692698 unwrapped(input: KotlinUnwrappedInput!): String
693- generic(input: GenericInput!): String
694699 }
695700
696701 input InjectedInput {
@@ -705,27 +710,19 @@ class UnmappedInputFieldsTest {
705710 name: String
706711 street: String
707712 }
708-
709- input GenericInput {
710- name: String
711- }
712713 """ )
713714 .resolvers(object : GraphQLQueryResolver {
714715 fun injected (input : InjectedInput ): String? = input.nmae
715716 fun builder (input : BuilderTypoInput ): String? = input.name
716717 fun unwrapped (input : KotlinUnwrappedInput ): String = " ${input.name} ${input.address?.stret} "
717- }, GenericInputResolver () )
718+ })
718719 .options(failOptions()
719720 .objectMapperConfigurer { mapper, _ -> mapper.setInjectableValues(InjectableValues .Std ().addValue(" tenant" , " acme" )) }
720721 .build())
721722 .build()
722723 .makeExecutableSchema()
723- .assertEveryFieldResolves(except = setOf (
724- // the input classes misspell name on purpose
725- " Query.injected" , " Query.builder" ,
726- // TODO query generic once the type variable of its inherited parameter is resolved (#880)
727- " Query.generic"
728- ))
724+ // the input classes misspell name on purpose
725+ .assertEveryFieldResolves(except = setOf (" Query.injected" , " Query.builder" ))
729726
730727 val result = GraphQL .newGraphQL(schema).build().execute(
731728 """
0 commit comments