But now I'm only getting the someSlice slice. How can I query all the others?
Should I continue to specify one by one? ...on anotherSlice
Is there any option to query all the rest?
Are you trying to fetch the slice content with the Content relationship filed? In that case, you need to specify the Content Relationship field in your GraphQuery. Here is the documentation for this .
Is it planned to improve this in the future? Having a rather generic Page custom type with many different slices and variations, listing every slice is not really a viable solution. I'd imagine something similar to the ...rest keyword, when destructuring objects in JS.
While this is not something that is planned right now, it is logged as a feature request. I can see how something like a ...rest keyword like this would make developing GraphQueries much faster.
If/when anything changes for this one the team will update everyone here.
Hi! I'm facing the same issue here.
Just to try to understand:
I have a Custom Type called "pages".
Under this one, I have at least 30 slices with repeatable and non-repeatable fields.
I need to get the data from a content relationship (list) from one of those slices (slice01), so, my query should be something like this?
I'm able to get the data from this slice without any problems, even though it's a content relationship. My problem is the other slices that I have to request one by one. Is this correct? In this case, it's just a slice that I have to get the data from this type of content.
Like many other devs in this thread, I would really appreciate an option to have an operator like ...slicesFields that would get all the slices, which don't need a specific deeper query.
In the case of a page custom type that includes numerous slices, it's very laborious and error prone to specify all other slices including their variations...
Phil mentioned that his was logged as a feature request, where can we support it ?
On any document type, having a graphQuery to fetch linked data effectively makes adding new slices types to the page a 2 step process, time consuming and error prone. ...slicesFields may not look like much but it would be a game changer.
Currently it seems the easiest way to fetch links without going into list-all-slices-type-in-your-graph-query hell is to make multiple API calls, which is bad for everyone.
Hey @emiliano.bucci, At the moment, there are no plans to modify the functionality of GraphQuery. The best solution is to either query the linked document individually or manually call each slice.