23 lines
456 B
TypeScript
23 lines
456 B
TypeScript
![]() |
import gql from "graphql-tag";
|
||
|
|
||
|
import makeMutation from "@saleor/hooks/makeMutation";
|
||
|
import {
|
||
|
WarehouseDelete,
|
||
|
WarehouseDeleteVariables
|
||
|
} from "./types/WarehouseDelete";
|
||
|
|
||
|
const deleteWarehouse = gql`
|
||
|
mutation WarehouseDelete($id: ID!) {
|
||
|
deleteWarehouse(id: $id) {
|
||
|
errors {
|
||
|
field
|
||
|
message
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
`;
|
||
|
export const useWarehouseDelete = makeMutation<
|
||
|
WarehouseDelete,
|
||
|
WarehouseDeleteVariables
|
||
|
>(deleteWarehouse);
|