Mutations

GraphQL Mutations

This section documents all available mutations in the pyck GraphQL API. Mutations allow you to create, update, and delete data in the system.

Available Mutations

Mutation Structure

Mutations in GraphQL follow a standard structure:

Working with Mutations

Input Types

Most mutations use dedicated input types to specify the data for the operation. For example, the createInventoryItem mutation uses the CreateInventoryItemInput type.

Return Types

Mutations typically return the affected entity, allowing you to retrieve updated values in the same operation.

Error Handling

Mutations may return errors for various reasons:

  • Invalid input data

  • Insufficient permissions

  • Conflicts with existing data

  • Business rule violations

Refer to the Error Handling documentation for more information on handling errors.

Example Mutation

Here's an example of creating a new inventory item:

Last updated

Was this helpful?