From f3c06e196997e0e7bfcd8cb3833e3fb3d05478ff Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 11 Dec 2024 23:06:55 +0300 Subject: [PATCH] mutation-fix-2 --- services/webhook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/webhook.py b/services/webhook.py index da732684..34c9389f 100644 --- a/services/webhook.py +++ b/services/webhook.py @@ -30,7 +30,7 @@ async def check_webhook_existence() -> bool: variables = {"params": {}} # https://docs.authorizer.dev/core/graphql-api#_webhooks gql = { - "query": f"query {operation}($params: GetWebhooksRequest!)" + "query": f"query {operation}($params: PaginatedInput!)" + "{" + f"{query_name}(params: $params) {{ webhooks {{ id event_name endpoint }} }} " + "}", @@ -68,7 +68,7 @@ async def create_webhook_endpoint(): } } gql = { - "mutation": f"mutation {operation}($params: AddWebhookRequest!)" + "query": f"mutation {operation}($params: AddWebhookRequest!)" + "{" + f"{query_name}(params: $params) {{ message }} " + "}",