-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Request for feedback: Add eslint-plugin-graphql to example #1088
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
This is sweet. CC @yuzhi, who's been thinking about validation lately (eg. graphql/graphql-js#355). |
Oh that's a great improvement, will make the error messages much more helpful! |
@stubailo This looks awesome. Are you thinking of adding a warning for fragment data that is requested but not used? Similar to 'no-unused-vars' ? http://eslint.org/docs/rules/no-unused-vars |
@dguillamot right now that's disabled, because in Relay/Lokka you often compose fragments, so you have strings like Do you have an app where that would be useful? Just filed an issue, let's discuss there: apollographql/eslint-plugin-graphql#10 |
Closing this as the examples have moved into a separate I don't know if you're still working on that plugin @stubailo, but I'd be welcome to adding it to the example over in the new repo. |
Yeah the plugin pretty much just works! So I'll resubmit to the new repo. |
Cool. I'll ping you when it's public. |
@stubailo and it's public... https://github.com/relayjs/relay-examples |
I don't know if you would want to merge this or not, but I'm working on an ESLint plugin for GraphQL validation.
The benefit over the babel relay plugin is that you can see and fix the errors right in your editor, and there's even a nice underline!
Here's the repo for the linter plugin: https://github.com/apollostack/eslint-plugin-graphql
It's not perfect yet, but I'm curious what you think of this direction, and what improvements you would want to see in such a tool!