question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KnownDirectives rule doesn't recognize SDL directive locations

See original GitHub issue

With SDL directive locations such as FIELD_DEFINITION added in 9.0, it appears the the KnownDirectives rule wasn’t updated to recognize these new locations:

https://github.com/graphql-java/graphql-java/blob/1839f250efcb0e5b36ac2301170256cc623b8c10/src/main/java/graphql/validation/rules/KnownDirectives.java#L45-L60

I came across this while using graphql-java to validate graphql files in js-graphql-intellij-plugin:

image

The change as I understand it appears to be minor, so I should be able to do a PR if the change is welcome.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bbakermancommented, Jun 20, 2018

Let us know if we need to tweak the errors that come out of parse / wire so that you can report the errors in terms of text / line numbers.

0reactions
jimkyndemeyercommented, Jun 20, 2018

Thanks, makes sense.

I’m currently using UnExecutableSchemaGenerator.makeUnExecutableSchema which appears to run a lot of the schema validation.

I’ll make sure to separate the “executable/runtime” validation from the schema validation. I have all the info I need from the plugin parse tree to differentiate between them inside the plugin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apollo Federation subgraph specification
The generated SDL should match that exactly with no additions. It is important to preserve the type extensions and directive locations and to...
Read more >
Directives SDL – GraphQL Tools
Using SDL directives, a subservice may express its complete schema and type merging configuration in a single document. See related handbook ...
Read more >
Directives - GraphQL .NET
The core GraphQL specification includes exactly four directives. ... If you try to apply the directive in locations that are not allowed for...
Read more >
SDL directives | GraphQL Java
There is only code place where logic needs to be written and it is then applied to all the places in the SDL...
Read more >
publication of directives: commandant instruction (ci), alcoast ...
(b) DHS Directives System Directive 112-01, Rev. ... (SDL) matrix on each Instruction is no longer necessary. ... itself a rule.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found