DEV Community

Discussion on: Using WordPress as a headless CMS with Next.js

Collapse
 
brentonjackson profile image
Brenton

Do it like this:

{sitename.com}/graphql?query={stuff that's in your graphiql query}

For example, to get all posts of a specific category:
query={category(id: "asdfh3e2"){posts{nodes{title}}}}

Play around with the GraphiQL IDE to find out the queries that go inside /graphql?query={}