Graphql fragments not working in slices queries #38523
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
I'm trying to create slices for my components and the queries for those components require to use Graphql Fragments since they are too long and repeat along other slices queries. I couldn't find anything on the documentation that says I can't use Graphql fragments inside slices queries so I'm guessing this is either a bug or it's missing in the documentation. I already did a lot of work implementing slices for my project and really need to be able to use fragments inside my slices queries.
Here is the code of the component I'm using to create the slice:
When I try to run my project I get the following error:
Reproduction Link
https://www.gatsbyjs.com/docs/how-to/performance/using-slices/#:~:text=build%20looks%20like%3A-,Using%20the%20Slice%20component%20in%20gatsby%2Dnode,Slice%20component%20a%20unique%20id%20.&text=Now%20that%20you%20have%20a,created%2C%20let's%20go%20use%20it!
Steps to Reproduce
...
Expected Result
I would excpect the slices queries accept fragments just as the page queries (Any fragments defined).
Actual Result
The slices queries don't detect the fragments exists.
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: