Modifier
The modifier node
| Method | Type | Description |
|---|---|---|
| id | ID! |
|
| pk | Int |
|
| merchant | MerchntNode! |
|
| name | String! |
|
| shortDescription | String! |
|
| description | String! |
|
| pictures | ProductComponentPictureNodeConection! |
|
| price | String |
|
| priceCurrency | ProductComponentPriceCrrency! |
|
| priceAmount | Float |
|
| outOfStock | Boolean! |
|
| order | Int! |
|
| groups | ProductComponentsGroupNodeConection! |
|
| orderItemsComponents | OrderItemComponentNodeConection! |
|
| extraInfo | JSOString |
|
| createdAt | DateTime! |
|
| updatedAt | DateTime! |
Create a modifier
mutation (
$name: String!
$price: Decimal!
$priceCurrency: String
$outOfStock: Boolean
$shortDescription: String!
$description: String!
$order: Int!
$groups: [ID]!
){
createProductComponent(
input: {
name: $name
price: $price
priceCurrency: $priceCurrency
outOfStock: $outOfStock
shortDescription: $shortDescription
description: $description
order: $order
groups: $groups
}
) {
errors
success
modifier {
id
}
}
}
Update a modifier
mutation (
$id: ID!
$name: String
$price: Decimal
$priceCurrency: String
$outOfStock: Boolean
$shortDescription: String
$description: String
$order: Int
$groups: [ID]
){
updateProductComponent(
input: {
id: $id
name: $name
price: $price
priceCurrency: $priceCurrency
outOfStock: $outOfStock
shortDescription: $shortDescription
description: $description
order: $order
groups: $groups
}
) {
errors
success
modifier {
id
}
}
}
Delete a modifier
Create a modifier picture
Update a modifier picture
Delete a modifier picture
the modifier group node
| Method | Type | Description |
|---|---|---|
| id | ID! |
|
| extraInfo | JSONString |
|
| isActive | Boolean! |
|
| createdAt | DateTime! |
|
| updatedAt | DateTime! |
|
| deletedAt | DateTime |
|
| merchant | MerchantNode! |
|
| components | ProductComponentNodeConnection! |
|
| name | String! |
|
| description | String! |
|
| isRequired | Boolean! |
|
| maxNumOfComponents | Int! |
|
| minNumOfComponents | Int! |
|
| products | ProductNodeConnection! |
|
| pk | Int |
|
| modifiers | ProductComponentNodeConnection |
Create a modifier group
mutation (
$name: String!
$description: String!
$isRequired: Boolean
$maxNumOfComponents: Int!
$minNumOfComponents: Int!
$components: [ID]
$products: [ID]
$extraInfo: JSONString
){
createProductComponentsGroup(
input: {
name: $name
description: $description
isRequired: $isRequired
maxNumOfComponents: $maxNumOfComponents
minNumOfComponents: $minNumOfComponents
components: $components
products: $products
extraInfo: $extraInfo
}
) {
errors
success
modifiersGroup {
id
}
}
}
Update a modifier group
mutation (
$id: ID!
$name: String
$description: String
$isRequired: Boolean
$maxNumOfComponents: Int
$minNumOfComponents: Int
){
updateProductComponentsGroup(
input: {
id: $id
name: $name
description: $description
isRequired: $isRequired
maxNumOfComponents: $maxNumOfComponents
minNumOfComponents: $minNumOfComponents
}
) {
errors
success
modifiersGroup {
id
}
}
}