CreateAttribute
Create an attribute
Parameters
| input - AttributInput |
|---|
| Data of the attribute |
Example
mutation {
CreateAttribute (
input: {
label: "Red"
option: {
id: 100123
}
}
){
id
}
}Returned data
{
"data": {
"CreateAttribute": {
"id": 101122
}
}
}UpdateAttribute
Update an attribute
Parameters
| id - ID |
|---|
| Id of the attribute |
| input - AttributeInput |
|---|
| Data of the attribute |
Example
mutation UpdateAttribute($id: ID!, $input: OrderInput!) {
UpdateAttribute(id: $id, input: $input) {
id
}
}{
"id": 100010,
"input": {
"label": "Pink"
}
}Returned data
{
"data": {
"UpdateAttribute": {
"id": 100010
}
}
}DeleteAttribute
Delete an attribute
Parameters
| id - ID |
|---|
| Id of the attribute |
Example
mutation DeleteAttribute($id: ID!) {
DeleteAttribute(id: $id)
}{
"id": 100009
}Returned data
{
"data": {
"DeleteAttribute": true
}
}AttributeInput data type
| label - String |
|---|
| Name of the attribute (ex: Red, Blue, XL, M) |
| option - Option - Subquery |
|---|
| Option of the attribute |
