API Reference

CreateOption

Create an option

Parameters

input - OptionInput
Data of the option

Example

mutation {
  CreateOption(
    input: {
      label: "Material"
    }
  ) {
    id
  }
}

Returned data

{
  "data": {
    "CreateOption": {
      "id": 101122
    }
  }
}

UpdateOption

Update an option

Parameters

id - ID
Id of the option
input - OptionInput
Data of the option

Example

mutation UpdateOption($id: ID!, $input: OptionInput!) {
  UpdateOption(id: $id, input: $input) {
    id
    label
  }
}
{
  "id": 100001,
  "input": {
    "label": "Size"
  }
}

Returned data

{
  "data": {
    "UpdateOption": {
      "id": 100001,
      "label": "Sizes"
    }
  }
}

DeleteOption

Delete an option

Parameters

id - ID
Id of the option

Example

mutation DeleteOption($id: ID!) {
  DeleteOption(id: $id)
}
{
  "id": 100009
}

Returned data

{
  "data": {
    "DeleteOption": true
  }
}

OptionInput data type

label - String
Title of the option