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

Write validator for deprecated fields #14

Open
stubailo opened this issue Apr 27, 2016 · 6 comments
Open

Write validator for deprecated fields #14

stubailo opened this issue Apr 27, 2016 · 6 comments
Labels
easy feature New addition or enhancement to existing solutions help wanted

Comments

@stubailo
Copy link
Contributor

Would be good to know what the message looks like, and if it works well!

@stubailo
Copy link
Contributor Author

screenshot 2016-04-27 11 38 23

@stubailo stubailo changed the title Add test for deprecated fields Write validator for deprecated fields Apr 27, 2016
@stubailo
Copy link
Contributor Author

Tweeted at Lee Byron to ask if there is an easy solution: https://twitter.com/stubailo/status/725396098584592384

@stubailo stubailo added feature New addition or enhancement to existing solutions and removed enhancement labels Apr 27, 2016
@jnwng
Copy link
Contributor

jnwng commented Jan 31, 2017

looks like we'd just need to integrate with graphql/graphql-js#389

@sdcooke
Copy link

sdcooke commented Feb 7, 2017

I think this is as simple as master...sdcooke:deprecated to find the fields. I'm not sure how you would want to integrate this properly (e.g. making it an optional rule) and I haven't got my head around this codebase properly yet so someone else is probably much better placed to implement it fully.

Modifying the plugin directly I've got output along the lines of:

"The field X.X is deprecated. [deprecation message from schema]"

@stubailo
Copy link
Contributor Author

Yeah I think a custom validation rule in the options would be good, or perhaps a separate option like "validateDeprecatedFields: true"

@koddsson
Copy link
Contributor

This has been done in #93!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy feature New addition or enhancement to existing solutions help wanted
Projects
None yet
Development

No branches or pull requests

4 participants