Dynamic Gatsby GraphQL queries with Plasmic

gatsby specific problem. have you guys seen anyone use dynamic graphql queries with plasmic? in gatsby, we’d have to pass the dynamic part via gatsby-node’s createPage call. it doesn’t seem apparent that plasmic can pass data from gatsby-node, seems like it goes straight to the pageQuery

my specific context: we run a blog via gatsby. on many of our landing pages, we query gatsby’s data layer to show the blog’s as links… being able to create landing page’s in plasmic with any of the blog post we wrote in gatsby would be awesome. i was thinking of having a ‘component’ in plasmic display all the blog posts possible, and page builders could grab the ID or slug of the post, and then in the actual page specify that ID/Slug which will get passed to the graphql query to render the correct post.

sorry it’s a long one! hope it makes sense

Hi, yes, you can generate dynamic routes in Gatsby by following this

https://docs.plasmic.app/learn/dynamic-pages/#example-statically-generated-productsslug-pages-in-nextjs-or-gatsby=&framework=gatsby

Let me know if that helps!