Connect WordPress
Point Toolkit at a WordPress installation with WPGraphQL enabled.
Documentation
A practical guide to connecting WordPress, exploring your schema, generating queries, testing results, and exporting frontend-ready code.
Point Toolkit at a WordPress installation with WPGraphQL enabled.
Browse posts, pages, taxonomies, custom types, and extension fields.
Select fields visually, provide arguments, and verify live response data.
Keep useful queries reusable and understandable across projects.
Move validated operations into Next.js, React, Nuxt, Apollo, or Relay.
Diagnose authentication, schema, CORS, and plugin compatibility issues.
Install and activate WPGraphQL on your WordPress site, then install and activate WP GraphQL Toolkit. Open the Toolkit workspace from WordPress admin and confirm the schema explorer loads.
Choose a root field such as posts, pages, or products. Add arguments, select nested fields, preview the response, then save or export the operation.
query LatestPosts {
posts(first: 10, where: { status: PUBLISH }) {
nodes {
id
slug
title
excerpt
}
}
}The explorer reflects the schema currently exposed by your WordPress endpoint. If a type or field is missing, check its WordPress registration and the plugin that exposes it to WPGraphQL.
Public queries use the permissions exposed by your GraphQL endpoint. Queries for drafts, private content, mutations, or protected data require an authenticated WordPress user and a supported authentication method.
Export validated operations as GraphQL documents or code-friendly strings. Keep the query separate from presentation components and regenerate frontend types when your schema changes.
const response = await fetch(process.env.WORDPRESS_GRAPHQL_URL!, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: LatestPosts }),
});