2022-02-21 13:32:38 +00:00
|
|
|
import { gql } from "@apollo/client";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
export const categoryDeleteMutation = gql`
|
|
|
|
mutation CategoryDelete($id: ID!) {
|
|
|
|
categoryDelete(id: $id) {
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...ProductError
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
export const categoryCreateMutation = gql`
|
|
|
|
mutation CategoryCreate($parent: ID, $input: CategoryInput!) {
|
|
|
|
categoryCreate(parent: $parent, input: $input) {
|
|
|
|
category {
|
2022-03-09 08:56:55 +00:00
|
|
|
...CategoryDetails
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...ProductError
|
2020-03-05 14:59:25 +00:00
|
|
|
}
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const categoryUpdateMutation = gql`
|
|
|
|
mutation CategoryUpdate($id: ID!, $input: CategoryInput!) {
|
|
|
|
categoryUpdate(id: $id, input: $input) {
|
|
|
|
category {
|
2022-03-09 08:56:55 +00:00
|
|
|
...CategoryDetails
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...ProductError
|
2020-03-05 14:59:25 +00:00
|
|
|
}
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const categoryBulkDeleteMutation = gql`
|
|
|
|
mutation CategoryBulkDelete($ids: [ID]!) {
|
|
|
|
categoryBulkDelete(ids: $ids) {
|
2021-04-26 07:49:55 +00:00
|
|
|
errors {
|
2022-03-09 08:56:55 +00:00
|
|
|
...ProductError
|
2019-06-19 14:40:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|