Get more information about @deprecated fields from SchemaDiff#1610
Merged
bbakerman merged 5 commits intoJan 14, 2020
Conversation
Contributor
Author
|
@andimarek @bbakerman Sorry for the bump, my organization has been looking for this feature for a while. Could you spend a moment taking a look at this? |
bbakerman
approved these changes
Sep 9, 2019
bbakerman
left a comment
Member
There was a problem hiding this comment.
Thanks very much for this PR. In general I think its an improvment
I wonder aloud if we should not have 2 enums for depreacted
- DEPRECATED_REMOVED
- DEPRECATED_ADDED
To distinguish that which was deprecated and then removed versus that which is newly deprecated
??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #1504
Let me know your thoughts on this. My strategy was to just add another category, which can provide the extra information and keep the
DangerandBreakinglevels untouched.The two new combinations of level and category are:
DANGER, category:DEPRECATEDfor fields that become deprecatedBREAKING, category:DEPRECATEDfor fields that were deprecated and now missingTodo:
@deprecatedin the new schema@deprecatedin the old schemaRemarks:
It's actually interesting to note that
@deprecatedon anything butFIELD_DEFINITION | ENUM_VALUEis not currently a valid spec-compliant use of the directive.See: https://graphql.github.io/graphql-spec/June2018/#sec--deprecated
and the corresponding implementation proposed on graphql-js: https://github.com/graphql/graphql-js/pull/1560/files