How do you get block data? #272
Replies: 2 comments 1 reply
-
You can see the getPostTypeProps() function in the getStaticProps() that fetch props from the WP GraphQL API. |
Beta Was this translation helpful? Give feedback.
-
@henrikwirth Thanks for the question. @reinis7 Answered correctly that we're grabbing The I wrote a blog post about this too: https://webdevstudios.com/2021/04/20/quick-tip-gutenberg-blocks-as-json/ Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hi guys, great starter.
Just diving through to understand your setup a little more since I'd like to move towards NextJS from Gatsby setups and also would like to use Gutenberg instead of ACF Flexible Layouts.
Now I'm wondering how you get the Gutenberg data as
block
JSON?I don't think this is part of standard WPGraphQL but I couldn't find anything related to it in your codebase. What am I missing :D ?
Beta Was this translation helpful? Give feedback.
All reactions