Fundamentals of GraphQL

GraphQL Mutations in Craft CMS

How to create a new entry, update an entry, and delete an entry in Craft CMS via GraphQL.

Muta­tions in GraphQL allow you to cre­ate or mod­i­fy data on the serv­er via queries. Prac­ti­cal­ly speak­ing, this means we can cre­ate a new entry or upload an asset or delete a tag via a GraphQL query.

Muta­tions weren’t avail­able in the first roll-out of GraphQL sup­port in Craft CMS but as of Craft 3.5, we now we have the abil­i­ty run muta­tion queries.

This video is a gen­tle intro­duc­tion to muta­tions. We’ll work in the GraphiQL play­ground avail­able via the Craft Con­trol Panel. 

In order to fol­low along with this video, you only need a Craft instal­la­tion with a sec­tion and fields so we can run some muta­tion queries. 

Fundamentals of GraphQL is made up of the following videos: