★ wanayoo — archive 1999 https://github.com/graphql-java/graphql-java/pull/1610Nouvelle recherche | Portail wanayoo
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

Get more information about @deprecated fields from SchemaDiff #1610

Merged

Conversation

@grrttedwards
Copy link
Contributor

@grrttedwards grrttedwards commented Jul 30, 2019

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 Danger and Breaking levels untouched.

The two new combinations of level and category are:

  1. level: DANGER, category: DEPRECATED for fields that become deprecated
  2. level: BREAKING, category: DEPRECATED for fields that were deprecated and now missing

Todo:

  • Detect fields that are @deprecated in the new schema
  • Detect removals that were @deprecated in the old schema
  • ???

Remarks:
It's actually interesting to note that @deprecated on anything but FIELD_DEFINITION | ENUM_VALUE is 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

@grrttedwards grrttedwards marked this pull request as ready for review Aug 16, 2019
@grrttedwards
Copy link
Contributor Author

@grrttedwards grrttedwards commented Aug 16, 2019

@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?

Copy link
Member

@bbakerman bbakerman left a 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

??

@bbakerman bbakerman added this to the 14.0 milestone Sep 9, 2019
@bbakerman bbakerman merged commit 8fe5e53 into graphql-java:master Jan 14, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.