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

Proper treatment of deprecated portions of schema #34

Closed
leebyron opened this issue Sep 23, 2015 · 5 comments
Closed

Proper treatment of deprecated portions of schema #34

leebyron opened this issue Sep 23, 2015 · 5 comments

Comments

@leebyron
Copy link
Contributor

No description provided.

@stubailo
Copy link

Related: graphql/graphql-js#389

@rewop
Copy link

rewop commented Jun 2, 2016

I would like to contribute on this one.

If I understand this issue correctly, we could add visual cues about deprecated fields in the DocExplorer such as strikethrough text for the name, and deprecation reasons in the description.

Would this solve this issue? Or there is more?

@kdaigle
Copy link

kdaigle commented Jun 17, 2016

@rewop as just another user of this library, I'd love to see the deprecation when looking through the Doc tray on the right. Super bonus points if the query itself got some treatment when using autocomplete to so a warning when using a deprecated field. 👍

davidcelis added a commit to davidcelis/graphiql that referenced this issue Aug 2, 2016
The GraphQL specification [states clearly](https://facebook.github.io/graphql/#sec-Deprecation):

> Tools built using GraphQL introspection should respect deprecation by
> discouraging deprecated use through information hiding or
> developer‐facing warnings.

Currently, however, GraphiQL doesn't give any indication of whether or
not a field or enum value is deprecated. This patch rectifies this by
adding some red text next to field names and enum value names that just
says "(DEPRECATED)". If a deprecation reason is given for a field or
enum value, that is rendered (also in red) underneath the field or
value's description.

Closes graphql#34.

Signed-off-by: David Celis <me@davidcel.is>
davidcelis added a commit to davidcelis/graphiql that referenced this issue Aug 3, 2016
The GraphQL specification [states clearly](https://facebook.github.io/graphql/#sec-Deprecation):

> Tools built using GraphQL introspection should respect deprecation by
> discouraging deprecated use through information hiding or
> developer‐facing warnings.

Currently, however, GraphiQL doesn't give any indication of whether or
not a field or enum value is deprecated. This patch rectifies this by
adding some red text next to field names and enum value names that just
says "(DEPRECATED)". If a deprecation reason is given for a field or
enum value, that is rendered (also in red) underneath the field or
value's description.

Closes graphql#34.

Signed-off-by: David Celis <me@davidcel.is>
@1aurabrown
Copy link

hello, I deprecated some enum values in our codebase, however I don't see an accompanying message appearing in the Docs panel when I use the deprecated enum. In our implementation, the enum is being used as an argument. I'm not familiar with the graphql code base, and I'm wondering if the change that was made to display deprecationReasons in the Docs panel does not account for enums used as an argument. like @kdaigle, I also think it would be nice if the deprecated enum values were treated with some visual indication in the autocomplete.

In the examples below, we had some enums whose values were lowercase, and I wanted to standardize them with new uppercase values, deprecating the lowercase ones.


no message in docs when using a deprecated enum value:
screen shot 2017-01-12 at 12 20 02 pm

would be nice to have a strikethrough or grey color on deprecated fields:
screen shot 2017-01-12 at 12 20 09 pm

If someone can show me around a little bit, I'm happy to PR a change.

@asiandrummer
Copy link
Contributor

@1aurabrown - Probably related to #273 - we can continue this discussion there!

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

6 participants