Inputs

About Inputs and Mutations

Inputs are used to pass data into mutations, which are functions used to create or modify data using the API. The input type is defined as part of the mutation definition, and the required fields are passed as a variable when the mutation is called.

For more information see GraphQL Input Types in the GraphQL documentation.

For example, the CreateProductInput input type is used to pass data into the createProduct mutation:

mutation CreateProductMutation($input: CreateProductInput!) {
  createProduct(input: $input) {
      id
      name
      createdBy {
          id
          email
      }
  }
}
"input": {
    "name": product_name,
    "group": business_unit_id,
    "createdBy": created_by_user_id,
    "ctx": {
        "businessUnit": business_unit_id
    }
}

All Inputs

This page was generated: 2024-05-17