Skip to content

SchemaParser.determineType does not determine input types as GraphQLInputObjectType #321

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

Open
lilianchiassai opened this issue Oct 10, 2019 · 0 comments

Comments

@lilianchiassai
Copy link

lilianchiassai commented Oct 10, 2019

I am using directives from graphql-java-extended-validation.

A directive can apply to an input object types (GraphQLInputObjectType). A check makes sure that the current input instance is of type GraphQLInputObjectType before applying the directive.
As SchemaParser.determineType returns either a GraphQlList, a GraphQLNonNull or a GraphQLTypeReference, such a directive will never be applied.

I suppose there is reason for this behavior (I am new to graphql-java), but: could it be changed or could the instance check be performed in another way? I could allow the directive to run against GraphQLTypeReference as a workaround, but that's broader than my original scope (which iis only inputs, no GraphQLEnum, no GraphQLList, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant