-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
support extracted fragments in GraphiQL #14371
Comments
Would love to have this feature! |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
I am surprised this doesn't have more traction. The lack of fragments in graphiql leaves a pretty big hole in my workflow. |
Any reason why fragments are not supported yet? This is such a bother when testing queries in graphiql. |
Fixed with #28878 |
Summary
This should auto-attach extracted fragments to queries in graphiql:
gatsby
- we should push query from graphiql editor through relay-compiler to automatically attach fragmentscodemirror-graphql
(set of graphql related extensions tocodemirror
editor that is used ingraphiql
) should transform query and attach fragments, so hints (autocomplete) and lint (red underline on unknown identifiers) make use of gatsby fragments - I opened issue incodemirror-graphql
that would add support for this - https://github.com/graphql/codemirror-graphql/issues/260 , which would be nicest way forward, but if this won't be accepted we can fork it to add this featuregraphql-language-service-interface
to show fragment spread earlier so they can be discovered much easier ( https://github.com/graphql/graphql-language-service/issues/358 )Basic example
I've made proof of concept that involved lot of monkey patching with very nice result:
(see code changes master...pieh:graphiql-explorer-fragments )
This would need to be cleaned up, ideally changes applied in upstream packages if possible, to reduce hackiness needed to implement this in Gatsby GraphiQL editor
Motivation
This is common pain point, that queries that work in page/static queries that use fragments don't work in graphiql. Goal here is to widen support for fragments and lower friction.
The text was updated successfully, but these errors were encountered: