Issues populating data using gatsby-source-strapi plugin #39016
Unanswered
SolivanLau
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there folks,
I have been trying to set up a gatsby-strapi project and have been struggling to query deep nested data using graphql and gatsby's data layer. I am unable to populate data when a dynamic zone has components with images or sub components.
I am using Strapi V4 and Gatsby v5
Example: In strapi i have a single type for a webpage with a dynamic zone.
Inside the dynamic zone i have 2 components to choose from
Both components are made up of sub components for a basic link (label, href, isExternalLink) and a basic image (media, altText).
When i add content in Strapi CMS and run Gatsby Develop, I can query all data except for components inside the dynamic zone. Specifically, nested components and images inside a dynamic zone component. i only get
strapi-component
andid
nodes...I have defined all deep queries in my gatsby-config that gatsby needs to populate from strapi: doc notes here.
I have checked the max query depth in my strapi app beyond the default 7 layers. In Strapi's graphql playgound i am able to produce the data i need:
Does anyone know what the exact issue is and how best to solve this? i have read on some quirks using dynamic zones and sub components with gatsby-strapi-source plugin and Gatsby's data layer but have found nothing to resolve this. I am fairly new to the CMS and GraphQL realm - any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions