Headless WordPress: why WPGraphQL wins

Cut the head off WordPress: it serves the data, a JS frontend renders the page.

With REST, one post page can mean four round trips: post, author, categories, image. With WPGraphQL, you ask for the shape and get exactly that shape back, in one request.

But it’s a trade-off, not a free win. Lock it before launch:

  • introspection off
  • query depth limit
  • page size cap (graphql_connection_max_query_amount)
  • persisted queries + GET → cacheable at the CDN
  • revalidate on publish (transition_post_status → revalidateTag)

Nested content and you own both ends → WPGraphQL. Flat content → REST. Editors live in page builders → stay classic.

AI writes the query. You pick the architecture.

Go deeper