What is a Mutation API?
The GraphCMS API is, at the core, built from content models. Content Models are custom GraphQL Types comprised of one or more fields.
The Mutation API modifies your content and content models directly.
A dynamic Create, Update, Delete and Publishing mutation API, served on the fly by your own custom defined schema.
The GraphCMS API is, at the core, built from content models. Content Models are custom GraphQL Types comprised of one or more fields.
The Mutation API modifies your content and content models directly.
Create, Update, Upsert and Delete single content entries with the Hygraph mutation API.
Update and Delete many of your content entries at once with the Hygraph mutation API.
Quickly publish, unpublish content entries with a single mutation. Create entries on the fly if they don't already exist.
Mutate content via GraphQL with mutations dynamically generated from a custom schema.
mutation {createPage(data: {title: "Hygraph mutation API",slug: "hygraph-mutation-api"}) {idtitleslug}}
mutation {updatePage(where: {slug: "hygraph-mutation-api"},data: {title: "Hygraph Mutation API!",}) {idtitle}}
mutation {deletePage(where: {slug: "hygraph-mutation-api"}) {idtitle}}
mutation {upsertPage(where: {slug: "hygraph-mutation-api"},upsert: {create: {title: "Title created if entry doesn't exist"},update: {title: "Title updated if entry exists"}}) {title}}
mutation {updateManyPages(where: {id: "ck7kheagg0mjt0153ldb2hv3r"}, data: {title: "Updated title"}) {count}}
mutation {publishPage(where: {slug: "hygraph-mutation-api"},to: PUBLISHED) {stage}}