saleor-dashboard/src/categories/mutations.ts
Jonatan Witoszek 90807bb0cf
Update unassignProductAttributeMutation to use new array parameter types (#1957)
* Update unassignProductAttributeMutation to use new array parameter types

* Replace [Collection]! with [Collection!]! in queries to match API changes

* Fix failing test on ProductVariantPage
2022-03-31 14:45:48 +02:00

46 lines
936 B
TypeScript

import { gql } from "@apollo/client";
export const categoryDeleteMutation = gql`
mutation CategoryDelete($id: ID!) {
categoryDelete(id: $id) {
errors {
...ProductError
}
}
}
`;
export const categoryCreateMutation = gql`
mutation CategoryCreate($parent: ID, $input: CategoryInput!) {
categoryCreate(parent: $parent, input: $input) {
category {
...CategoryDetails
}
errors {
...ProductError
}
}
}
`;
export const categoryUpdateMutation = gql`
mutation CategoryUpdate($id: ID!, $input: CategoryInput!) {
categoryUpdate(id: $id, input: $input) {
category {
...CategoryDetails
}
errors {
...ProductError
}
}
}
`;
export const categoryBulkDeleteMutation = gql`
mutation CategoryBulkDelete($ids: [ID!]!) {
categoryBulkDelete(ids: $ids) {
errors {
...ProductError
}
}
}
`;