Skip to content
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

Field deprecation via schema using directive @deprecated #8

Closed
acidbluebriggs opened this issue Apr 27, 2017 · 2 comments
Closed

Field deprecation via schema using directive @deprecated #8

acidbluebriggs opened this issue Apr 27, 2017 · 2 comments

Comments

@acidbluebriggs
Copy link
Contributor

There doesn't seem to be a way to publish deprecated messages for Fields/Enums. There is an implementation of a @deprecated directive added to the graphql-js implementation found At this merge. Could we add this processing to the SchemaParser.kt class so we can deprecate via the schema?

I'm currently working on adding this and was wondering if there were any issues you might have with this? I noticed on the README.md for 3.0 that the @doc directive seems to have been removed. Is there a reason for this? Are directives being removed completely? If so, how are we going to be able to deprecate fields/enums in the schema?

@apottere
Copy link
Collaborator

apottere commented Apr 27, 2017

This would be a great addition - directives aren't being removed, the @doc directive was just a workaround till the ANTLR parser supported saving comments (which is coming in graphql-java 3.0).

@acidbluebriggs
Copy link
Contributor Author

acidbluebriggs commented Apr 27, 2017

Cool, I'll get that going. Thanks!

acidbluebriggs pushed a commit to acidbluebriggs/graphql-java-tools that referenced this issue Apr 27, 2017
…), or an empty @deprecated, directive can be used within the schema definition and the messages will now be available when a client introspects the schema for deprecated values. The README.md has also been updated to reflect the new addition.
apottere pushed a commit that referenced this issue Apr 27, 2017
…ated, directive can be used within the schema definition and the messages will now be available when a client introspects the schema for deprecated values. The README.md has also been updated to reflect the new addition. (#9)
acidbluebriggs pushed a commit to acidbluebriggs/graphql-java-tools that referenced this issue May 2, 2017
…), or an empty @deprecated, directive can be used within the schema definition and the messages will now be available when a client introspects the schema for deprecated values. The README.md has also been updated to reflect the new addition.
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

2 participants