categoryUpdate Mutation
Updates a category.
Arguments
#
Response
#
Returns CategoryUpdate .
Example
#
mutation ($id: ID!, $input: CategoryInput!) {
categoryUpdate(id: $id, input: $input) {
productErrors {
field
message
code
attributes
}
category {
id
description
descriptionHtml
externalId
externalSource
seoTitle
seoDescription
name
slug
allowProductAssignment
level
}
}
}
3
{
"id": "aWQ6OTA=",
"input": {
"description": "A description",
"descriptionHtml": "descriptionHtml",
"name": "Acme",
"slug": "sample-slug",
"seo": {
"title": "title",
"description": "A description"
},
"backgroundImage": "Upload",
"backgroundImageAlt": "backgroundImageAlt",
"allowProductAssignment": true,
"customFields": [
{
"id": "aWQ6NTU=",
"values": [
"values"
],
"value": "value",
"dateTime": "2022-03-06T08:23:45.000Z",
"plainText": "plainText",
"richText": "richText",
"amount": 10.23,
"currency": "currency",
"reference": "reference",
"boolean": true,
"file": "Upload",
"fileUrl": "fileUrl"
}
]
}
}
3
{
"categoryUpdate": {
"productErrors": [
{
"field": "string",
"message": "string",
"code": "ALREADY_EXISTS",
"attributes": [
"YXR0cmlidXRlczoxMg=="
]
}
],
"category": {
"id": "aWQ6NTE=",
"description": "string",
"descriptionHtml": "string",
"externalId": "string",
"externalSource": "string",
"seoTitle": "string",
"seoDescription": "string",
"name": "Acme",
"slug": "sample-slug",
"allowProductAssignment": true,
"level": 42
}
}
}
3