-
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
docs: Add a note about gatsby-image
fragments not working in GraphiQL
#25387
Conversation
This is a known issue, but it could confuse new Gatsby users (like myself). [See the `gatsby-image` docs for details](https://www.gatsbyjs.org/packages/gatsby-image/#fragments), and [this GraphiQL issue for progress on a fix](graphql/graphiql#612).
gatsby-image
fragments not working in GraphiQL
hey @MarkBennett ! good point. I'm the primary maintainer for graphiql and a gatsby employee, and this is one of the issues we plan on solving with what might be a better fix for the documentation is to include the fragment that needs to be included in the graphiql query. these shared fragments are actually appended to the user queries defined at runtime, so that abstraction is why it doesn't work in graphiql currently. |
Thanks for the quick reply! That would be great, as I'd very much like to use the fragments in my queries as well. How might I include them? I'll update the docs but don't know myself. 😉 |
to note, gatsby image contains docs that warns these queries won't work in GraphiQL here because these fragments are generated on the fly, unlike the static ones used in some plugins, I actually don't think there is a way to use these in |
Yes. That's my understanding as well. I've linked to those in my note about why the queries in the tutorial won't work in GraphiQL. I'm mostly thinking including a note near the first query would help new learners undertand about the fragments, as right now there's just an error and it's unclear if it's expected or not. |
@MarkBennett oh of course, yes this makes sense. Thanks for the PR :D Some nice improvements to this coming soon! |
Thanks! It looks like I'm failing on your CI, but I can't see the linter output. Will look closer when I'm at my computer. |
Co-authored-by: Yogi <[email protected]>
gatsby-image
fragments not working in GraphiQLgatsby-image
fragments not working in GraphiQL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'm excited for the changes Rikki mentioned but adding this line to the tutorial should be helpful. Thanks for the contribution, @MarkBennett!
Holy buckets, @MarkBennett — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
…QL (gatsbyjs#25387) * Add a note about queries not working in GraphiQL This is a known issue, but it could confuse new Gatsby users (like myself). [See the `gatsby-image` docs for details](https://www.gatsbyjs.org/packages/gatsby-image/#fragments), and [this GraphiQL issue for progress on a fix](graphql/graphiql#612). * chore: format * Update docs/tutorial/gatsby-image-tutorial/index.md Co-authored-by: Yogi <[email protected]> * Fix relative link Co-authored-by: gatsbybot <[email protected]> Co-authored-by: Ward Peeters <[email protected]> Co-authored-by: Yogi <[email protected]> Co-authored-by: Aisha Blake <[email protected]>
This is a known issue, but it could confuse new Gatsby users (like myself).
See the
gatsby-image
docs for details, and this GraphiQL issue for progress on a fix.Description
Add a note about
gatsby-image
query fragments not working in GraphiQL.Documentation
This is a documentation change.
Related Issues