“Unlock the Future of Web Development: Discover the Hidden Powers of Headless WordPress!”
If you want to just test a few things and follow along with this tutorial, you can also use WordPress.com’s free and open source local development environment, Studio, to spin up a local WordPress installation.
WordPress ships with a REST API, but as mentioned above, many developers opt for the WPGraphQL plugin when building Headless sites, which allows us to add a GraphQL endpoint to your WordPress site.
If you opt to use the REST API instead, you can start without installing any plugins.
Creating a content structure for API consumption
Let’s consider a WordPress post or page. We have a title, an ID, a slug, a featured image, and a few more fields. However, most posts have rich content added via the editor, which makes up most of the post content.
Post Comment