Deprecated directive is missing from the schemaSee original GitHub issue
Library Version latest snapshot
Describe the bug
@deprecated directive is no longer applied to the schema
Run example app and check generated schema - it contains 5 directives (custom
@cakeOnly as well as
@include built-in ones).
Schema should contain
@deprecated directive as some fields (e.g.
simpleDeprecatedQuery are deprecated)
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@deprecated directive is pretty special in a sense that it is just informational as there is no associated
RuntimeWiring behind it that would customize it behavior.
I was thinking that we could add explicit support for it (as well as the ability to customize the behavior) by doing something along those lines -> https://github.com/ExpediaDotCom/graphql-kotlin/pull/247
It appears that there are multiple potential issues
playgroundrelated issues 339 and 816 - currently
playgrounddoesn’t handle deprecated well (as compared to
graphiql), this is what actually started this investigation
graphql-javarelated issue 1434 - currently
graphql-javafilters out “common” directives (
deprecated) from printing in SDL.
graphql-javaalso only adds the deprecated directive to the schema when manually loading it from the file (e.g. here -> https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/schema/idl/SchemaGenerator.java#L265)
@depreacteddirectives directly to instrumentation results (e.g. here https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/introspection/IntrospectionResultToSchema.java#L237)