Payload CMS · GraphQL Specification

Payload CMS GraphQL API

Payload CMS ships a fully featured GraphQL API generated automatically from your collection and global configurations. Every collection defined in your Payload config produces a set of strongly-typed queries and mutations — find by ID, find (paginated), count, create, update, delete, duplicate, and version operations — all derived from the collection slug and its field definitions. Auth-enabled collections additionally receive login, logout, refresh, me, forgotPassword, resetPassword, verifyEmail, unlock, and initialized operations. Globals receive a findOne query and an update mutation. The schema is built at startup using `@payloadcms/graphql`'s `configToSchema()` function, and the resulting SDL can be exported with `pnpm payload-graphql generate:schema`.

Documentation Endpoint View on GitHub Headless CMSContent ManagementREST APIGraphQLNext.jsOpen SourceSelf-HostedTypeScriptGraphQL

Overview

Payload CMS GraphQL API is a GraphQL API specification published by Payload CMS on the APIs.io network.

Payload CMS ships a fully featured GraphQL API generated automatically from your collection and global configurations. Every collection defined in your Payload config produces a set of strongly-typed queries and mutations — find by ID, find (paginated), count, create, update, delete, duplicate, and version operations — all derived from the collection slug and its field definitions. Auth-enabled collections additionally receive login, logout, refresh, me, forgotPassword, resetPassword, verifyEmail, unlock, and initialized operations. Globals receive a findOne query and an update mutation. The schema is built at startup using @payloadcms/graphql’s configToSchema() function, and the resulting SDL can be exported with pnpm payload-graphql generate:schema.

The GraphQL endpoint is available at https://{your-domain}/api/graphql. documentation is published at https://payloadcms.com/docs/graphql/overview.

The specification includes 4 reference links.

Tagged areas include Headless CMS, Content Management, REST API, Next.js, and Open Source.

Endpoint

`https://{your-domain}/api/graphql`

References

Back to Payload CMS · All GraphQL Specs · GitHub