You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mutations with nested input types generate errors see below. I've tried the workarounds with dummy methods but it generates stack overflow instead. The thing is that I have two schemas and both contain nested input types, but I run into the problems with only one of them. The one that is slightly complicated and closer to the real life;)
Expected behavior
Actual behavior
Caused by: graphql.kickstart.tools.SchemaError: Expected type 'InsuranceAgreementCreateOneWithoutInsuranceAgreement_IncludedAgreementInput' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:419) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:428) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:428) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.parseSchemaObjects(SchemaParser.kt:79) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.makeExecutableSchema(SchemaParser.kt:112) ~[graphql-java-tools-6.2.0.jar:na]
at
Steps to reproduce the bug
failsagreement schema with corresponding FailsAgreement.java resolvers is the one generating errors.
worksperson schema with corresponding WorksPerson.java resolvers works fine.
Both schemas contain same kind of nested input types and programmatically generated. Both schemas run fine on Prisma backend.
I met the same bug with latest version graphql-java-tools. Workaround with method referencing nested input types works for me. I just wrote something like type Query { dummy(input1: Input1, input2: Input2...): Boolean }, added a trivial implementation and the error is gone.
But this bug is quite annoying.
Description
Mutations with nested input types generate errors see below. I've tried the workarounds with dummy methods but it generates stack overflow instead. The thing is that I have two schemas and both contain nested input types, but I run into the problems with only one of them. The one that is slightly complicated and closer to the real life;)
Expected behavior
Actual behavior
Caused by: graphql.kickstart.tools.SchemaError: Expected type 'InsuranceAgreementCreateOneWithoutInsuranceAgreement_IncludedAgreementInput' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:419) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:428) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:428) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.determineInputType(SchemaParser.kt:402) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.createInputObject(SchemaParser.kt:176) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.parseSchemaObjects(SchemaParser.kt:79) ~[graphql-java-tools-6.2.0.jar:na]
at graphql.kickstart.tools.SchemaParser.makeExecutableSchema(SchemaParser.kt:112) ~[graphql-java-tools-6.2.0.jar:na]
at
Steps to reproduce the bug
Source code:
https://github.com/afuyo/grapql-mutations-on-Kafka
Would be grateful for any input.
/Artur
The text was updated successfully, but these errors were encountered: