See the Queries page for a presentation of this resource.
Create an attribute
| input |
|---|
| Data of the attribute |
mutation {
CreateAttribute (
input: {
label: "Red"
option: {
id: 100123
}
}
){
id
}
}
{
"data": {
"CreateAttribute": {
"id": 101122
}
}
}
Update an attribute
| input |
|---|
| Data of the attribute |
mutation UpdateAttribute($id: ID!, $input: OrderInput!) {
UpdateAttribute(id: $id, input: $input) {
id
}
}
{
"id": 100010,
"input": {
"label": "Pink"
}
}
{
"data": {
"UpdateAttribute": {
"id": 100010
}
}
}
Delete an attribute
mutation DeleteAttribute($id: ID!) {
DeleteAttribute(id: $id)
}
{
"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 } ) |