saleor-apps-redis_apl/packages/webhook-utils/src/disable-webhook.ts
Krzysztof Wolski 7e0755ec9e
Webhook helpers (#949)
* WIP

* Added script and making implementation more roboust

* Added rollback on issues with the migration

* Cleanup the code

* Use allSettled instead of all

* Do not check spelling in schema files.
Schema is pulled from the API and is not controlled by our team

* Update the pkg json

* Fix typo on log message

* Add dedupe to the ignored words.
Its used by codegen

* Add changesets
2023-09-07 13:04:23 +02:00

17 lines
365 B
TypeScript

import { Client } from "urql";
import { modifyAppWebhook } from "./operations/modify-app-webhook";
interface DisableWebhookArgs {
client: Client;
webhookId: string;
}
export const disableWebhook = async ({ client, webhookId }: DisableWebhookArgs) => {
return modifyAppWebhook({
client,
webhookId,
input: {
isActive: false,
},
});
};