Opens in a new tab

Independent WordPress hosting guides · Recommended host: Convesio

Start a free trial →

WPGraphQL vs the REST API for Headless WordPress

WordPress has a built-in REST API, and many headless sites add WPGraphQL. How they differ, what each is good at, and which to pick for common headless projects.
By Shahzad Hasan · November 24, 2026

A headless front end needs a way to ask WordPress for content. There are two common choices: the REST API built into WordPress, and WPGraphQL, a free plugin that adds a GraphQL API. Both work; they suit different projects.

The REST API

  • Built in: every WordPress site has it at /wp-json/, with no plugin needed (REST API Handbook).
  • One address per type of data: posts, pages, categories and so on each have their own endpoint.
  • Easy to cache with normal web caching, because each request is a plain URL.
  • Trade-off: a page that needs a post, its author, categories and related posts often takes several requests, and responses can include more data than you need.

WPGraphQL

  • One endpoint, ask for exactly what you need: the front end describes the fields it wants and gets them in one response (WPGraphQL).
  • Popular in headless frameworks: for example, Faust.js uses WPGraphQL for content, while its preview sign-in uses REST endpoints (WP Engine Builders).
  • Trade-off: it is a plugin to keep updated, caching needs more thought, and other plugins’ data only appears if they (or an extension) support GraphQL.

Which to pick

Situation Usually better
Simple site, few content types, plain caching REST API
Pages that combine lots of related content WPGraphQL
Using a framework built around GraphQL (such as Faust.js) WPGraphQL
Heavy use of plugins without GraphQL support REST API, or add the needed extensions

Previews

Neither API gives you WordPress’s normal “Preview” button on a separate front end by itself. Headless frameworks add a preview flow; FaustWP is one plugin that provides it (FaustWP).

Security basics

  • Expose only the content the front end needs; keep drafts and private data behind authentication.
  • Use application passwords or tokens for any authenticated requests, never an admin password. See Application passwords.

Start with What is headless WordPress if you are still deciding.

Sources: WordPress REST API Handbook, WPGraphQL, FaustWP, WP Engine Builders: post previews in headless WordPress, checked 24 November 2026.

In this article

Need hosting that scales?

Convesio runs each site in Docker containers with auto scaling and load balancing built in.
Try Convesio free →
Affiliate link: we may earn a commission at no extra cost to you.