Author:
Fluent Commerce
Changed on:
5 Apr 2024
Mutations in GraphQL are operations designed to modify server-side data, encompassing the creation, updating, or deletion of records. They play a critical role in dynamic data management within GraphQL applications, allowing for precise and controlled data manipulation.
A GraphQL mutation is a type of operation used to modify data on the server. While queries are used to fetch data, mutations are used to create, update, or delete data.
Mutation operations are used for creating or updating data. All mutation operations take a single parameter and have the naming convention:
`<<mutationName>>(<<MutationNameInput>>):<<Type>>`
Examples:
`createOrder(CreateOrderInput): Order // Create Order mutation`
`updateOrder(UpdateOrderInput): Order // Update Order mutation`
Create mutations are used to create new data.
Update mutations are used for updating existing data.
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.