Reject directives applied at the wrong location, without a required argument or twice in 15.0.0 · Issue #884 · graphql-java-kickstart/graphql-java-tools · GitHub
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
{{ message }}
Repository navigation
Reject directives applied at the wrong location, without a required argument or twice in 15.0.0 #884
Directive @uppercase is applied to field 'Query.motto', but it's declared on OBJECT, not FIELD_DEFINITION.
Directive @auth is applied to field 'Query.secret' without its required argument 'role'.
Directive @cached isn't repeatable but is applied more than once to field 'Query.members'.
graphql-java's SchemaGenerator rejects all three, and the spec doesn't allow them either. But they always built with tools, so failing on them has to wait for a major release.
What to change
replace the warnings from SchemaParser#directiveProblems with a SchemaError that has the same messages
probably do the same for the warning in SchemaParser#directivesOf, when a type extension applies a non-repeatable directive the type already has. It's the same mistake, it just drops the repeat today
turn DirectiveTest.should warn about invalid applied directives and keep them into a test for the error
Activity