Every content type generates a set of GraphQL fields at /graphql. For a type with apiId article, you get the operations below. An interactive explorer is available at /graphql in a browser.

Generated operations

For article:
OperationKindPurpose
article(id, status)queryFetch one entry by id.
articles(where, sort, limit, offset, status)queryList entries.
articlesCount(where, status)queryCount matching entries.
createArticle(data)mutationCreate a draft.
updateArticle(id, data)mutationPatch an entry.
deleteArticle(id)mutationDelete an entry.
publishArticle(id)mutationPublish.
unpublishArticle(id)mutationReturn to draft.

Filtering

Each field exposes operators matching its type. Combine them in the where argument.
OperatorApplies to
eq, neall fields (use eq: null for missing values)
inall fields (max 80 values)
containsstring fields
gt, gte, lt, ltenumbers and strings
Sort keys are fieldName_ASC or fieldName_DESC, including the built-in createdAt, updatedAt, and publishedAt. limit defaults to 50 and caps at 200.

Draft and publish

New entries are drafts. The status argument accepts DRAFT, PUBLISHED, or ALL, but it is only honored for authenticated users and write keys — anonymous and read-key callers always see published entries only.

Relations resolve inline

Relation fields resolve to the related entry type. A related entry that is still a draft is hidden from callers who cannot see drafts, and relations into a non-public type are hidden from anonymous callers.
Query depth is capped at 12 levels to prevent expensive cyclic-relation queries.