Closed andrewmumblebee closed 3 years ago
The reason it worked before with the gatsby-graphql-source
plugin is because the plugin just executed all the GraphQL queries on every site build, as opposed to building a data store and just adding new data to it on subsequent builds.
Matrix blocks and Neo block types are not queryable directly with Craft's GraphQL API and are not exposed as stand-alone types for Gatsby, so the source toolkit can't convert them to Nodes for Gatsby. So, when creating the data store, the toolkit can't replace the nesting relationships in a simple way.
I'm assuming Gatsby hits some nesting level limitations - perhaps @vladar can confirm if it's true.
@andris-sevcenko The GraphQL toolkit prevents recursive fragments (in generateDefaultFragments
function). For deep nesting, you should provide custom fragments of the expected depth. So in theory, if Craft plugin supports custom fragments - it should be possible to via additional config.
Thank you, @vladar!
@andrewmumblebee you'll want to take a look at the documentation here - hope this helps!
Description
Hi,
I've hit an issue with this plugin where it seems like the depth of the graph is limited.
I'm currently using a neo matrix, which was working fine with the original gatsby-source-graphql plugin.
This is what my query looks like in Gatsby
The matrix (ctas) block when placed at the root of the matrix returns its data correctly.
Here is a sample response.
Rebuilding this within CraftCMS using the graphiql UI works fine and so does the standard gatsby-source-graphql plugin.
Steps to reproduce
Additional info
Thanks for any help you can provide