saleor-dashboard/src/custom-apps/mutations.ts
Dawid bba95a8fb4
Extract "webhooks & events" to separate page (#2818)
* Extract "webhooks & events" to separate page

* Create separate /custom-app/ path for custom apps with webhooks

* Change all /webhooks/ paths to /custom-apps/

* Update messages

* Update generated graphql types

* Create findById util

* Refactor consts and resolvers for custom app urls

* Fix app graphql fragment

* Update Miscellaneous icon for Webhooks and Events

* Add tests for custom apps utils

* Fix dark-mode Miscellaneous icon for Webhooks and Events

* adjustments for autotests

Co-authored-by: karolm-saleor <karol.macheta@saleor.io>
2022-12-15 14:51:05 +01:00

37 lines
690 B
TypeScript

import { gql } from "@apollo/client";
export const webhookCreate = gql`
mutation WebhookCreate($input: WebhookCreateInput!) {
webhookCreate(input: $input) {
errors {
...WebhookError
}
webhook {
...WebhookDetails
}
}
}
`;
export const webhookUpdate = gql`
mutation WebhookUpdate($id: ID!, $input: WebhookUpdateInput!) {
webhookUpdate(id: $id, input: $input) {
errors {
...WebhookError
}
webhook {
...WebhookDetails
}
}
}
`;
export const webhookDelete = gql`
mutation WebhookDelete($id: ID!) {
webhookDelete(id: $id) {
errors {
...WebhookError
}
}
}
`;