See the Queries page for a presentation of this resource.
Create an attribute
input Data of the attribute
GraphQL
mutation {
CreateAttribute (
input: {
label: "Red"
option: {
id: 100123
}
}
){
id
}
}
JSON
{
"data": {
"CreateAttribute": {
"id": 101122
}
}
}
Update an attribute
input Data of the attribute
GraphQL
mutation UpdateAttribute($id: ID!, $input: OrderInput!) {
UpdateAttribute(id: $id, input: $input) {
id
}
}
Variables (JSON)
{
"id": 100010,
"input": {
"label": "Pink"
}
}
JSON
{
"data": {
"UpdateAttribute": {
"id": 100010
}
}
}
Delete an attribute
GraphQL
mutation DeleteAttribute($id: ID!) {
DeleteAttribute(id: $id)
}
JSON
{
"data": {
"DeleteAttribute": true
}
}
id Unique identifier of the attribute
label Name of the attribute (ex: Red, Blue, XL, M)
option Option of the attribute
label Name of the attribute (ex: Red, Blue, XL, M)
option Option of the attribute ( option { id: 100123 } )
id Unique identifier of the attribute
label Name of the attribute (ex: Red, Blue, XL, M)
option Option of the attribute ( option { id: 100123 } )