-
Notifications
You must be signed in to change notification settings - Fork 172
#434 Add GraphQlInputObjectType reference for NonNull INput types at … #435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#434 Add GraphQlInputObjectType reference for NonNull INput types at … #435
Conversation
…onNull INput types at Runtime Wiring - Added to the determineType the same approeach as determineInputType, but without the creation of non existing INput types (this could lead to infinity recursion) - Added Groovy Unit Test to ensure the problem is solved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please check how does this relate to this: #414 ?
They seems to be similar, but I saw that issue before and looking by its code I wondered it would not solve "my problem". But now I download that branch and ran my Unit test and it failed, so sadly they don't relate. As far as I rechecked in #414 code he's tackling an issue about cyclic reference, which can lead to stackoverflow. And my PR try to solve the problem of at runtime the library graphql-java-extended-validation (but any other "code" could fall into this issue too) is expecting an GraphQlInputObjectType but for Non Null types we just have the GraphQLTypeRefernce for the type that should not be null. This GraphQLTypeRefernce will only be replaced by "its imeplementation" of GraphQlInputObjectType at the end of the Schema parsing, so any DirectiveWiring, that executes in the middle of the Schema parsing, would not have access to the already created GraphQlInputObjectType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Just a couple minor suggestions.
src/test/groovy/graphql/kickstart/tools/SchemaParserSpec.groovy
Outdated
Show resolved
Hide resolved
src/test/groovy/graphql/kickstart/tools/SchemaParserSpec.groovy
Outdated
Show resolved
Hide resolved
…ing_on_nonnull_input
…ing_on_nonnull_input # Conflicts: # src/test/groovy/graphql/kickstart/tools/SchemaParserSpec.groovy
…ing_on_nonnull_input # Conflicts: # src/test/kotlin/graphql/kickstart/tools/SchemaParserTest.kt
Fixes #434 Add GraphQlInputObjectType reference for NonNull INput types at …Runtime Wiring
Checklist
Description