Skip to main content
Version: 1.0.0

GraphQL Mutations

Mutations in GraphQL are operations that allow you to modify data on the server. Unlike queries, which only retrieve data, mutations can create, update, or delete data.

Structure of Mutations

All mutations in our GraphQL API follow a consistent structure:

  1. Input Arguments: The data required to perform the operation
  2. Return Fields: The data returned after the operation is completed

Available Mutation Categories

Our GraphQL API provides mutations for various e-commerce operations:

Cart Operations

Mutations for managing shopping carts, including adding products, applying coupons, and removing items.

Checkout Operations

Mutations for the checkout process, including setting shipping and billing addresses, selecting shipping methods, and completing the checkout.

Customer Operations

Mutations for managing customer data, including order cancellation.

Purchase Operations

Mutations related to orders and purchases, including order cancellation and refunds.

Authentication

Some mutations require authentication, while others can be performed anonymously. The documentation for each mutation specifies whether authentication is required.

Error Handling

Mutations return errors in the standard GraphQL format. Each error includes a message and optional extensions with additional details.

Examples

Each mutation documentation includes examples showing how to use the mutation and what response to expect.