Mutations
- collectionAddProducts
- collectionCreate
- collectionDelete
- collectionRemoveProducts
- collectionReorderProducts
- collectionUpdate
- customerCreate
- customerDelete
- customerUpdate
- customerUpdateDefaultAddress
- draftOrderCalculate
- draftOrderComplete
- draftOrderCreate
- draftOrderDelete
- draftOrderInvoicePreview
- draftOrderInvoiceSend
- draftOrderUpdate
- flowTriggerReceive
- fulfillmentCreate
- fulfillmentServiceCreate
- fulfillmentServiceDelete
- fulfillmentServiceUpdate
- fulfillmentTrackingInfoUpdate
- inventoryActivate
- inventoryAdjustQuantity
- inventoryBulkAdjustQuantityAtLocation
- inventoryDeactivate
- marketingActivityUpdate
- marketingEngagementCreate
- metafieldDelete
- orderCapture
- orderClose
- orderMarkAsPaid
- orderOpen
- orderUpdate
- priceRuleActivate
- priceRuleCreate
- priceRuleDeactivate
- priceRuleDelete
- priceRuleDiscountCodeCreate
- priceRuleDiscountCodeUpdate
- priceRuleUpdate
- productAppendImages
- productCreate
- productDelete
- productDeleteImages
- productDuplicate
- productImageUpdate
- productReorderImages
- productUpdate
- productVariantCreate
- productVariantDelete
- productVariantUpdate
- publishablePublish
- publishablePublishToCurrentChannel
- publishableUnpublish
- publishableUnpublishToCurrentChannel
- refundCreate
- savedSearchCreate
- savedSearchDelete
- savedSearchUpdate
- scriptTagCreate
- scriptTagDelete
- scriptTagUpdate
- stagedUploadTargetGenerate
- stagedUploadTargetsGenerate
- storefrontAccessTokenCreate
- storefrontAccessTokenDelete
- tagsAdd
- tagsRemove
- webhookSubscriptionCreate
- webhookSubscriptionDelete
- webhookSubscriptionUpdate
The root Mutation
type in a GraphQL schema defines all the write operations that can change data.
It is analogous to performing HTTP verbs such as POST
, PATCH
, and DELETE
.
Mutations can take arguments as input similar to the body of a POST
request in REST. Like GraphQL queries, mutations can also return fields. This can be useful for fetching the new state of an object after an update.
The return type of mutations in the GraphQL Admin API always includes a userErrors
field. This is a list of errors that occurred during the mutation and each error includes a message
and field
. These errors make it easy to display information to the user such as validation errors.
We strongly recommend to always include userErrors
in your mutation query. If your mutation is returning null
, it's likely that there are errors which you won't see without it.