From 98b8b3338c72fc62f2c9428c8e02253c36e6ea94 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 28 Jun 2021 09:36:29 +0200 Subject: [PATCH] Fix a mutation that should have been a query Signed-off-by: Thomas Citharel --- js/src/graphql/config.ts | 4 ++-- js/src/services/push-subscription.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/graphql/config.ts b/js/src/graphql/config.ts index d0a049621..3089b6f8c 100644 --- a/js/src/graphql/config.ts +++ b/js/src/graphql/config.ts @@ -158,7 +158,7 @@ export const PRIVACY = gql` `; export const TIMEZONES = gql` - query { + query Timezones { config { timezones } @@ -166,7 +166,7 @@ export const TIMEZONES = gql` `; export const WEB_PUSH = gql` - query { + query WebPush { config { webPush { enabled diff --git a/js/src/services/push-subscription.ts b/js/src/services/push-subscription.ts index 738ecc54c..02195fdd6 100644 --- a/js/src/services/push-subscription.ts +++ b/js/src/services/push-subscription.ts @@ -22,8 +22,8 @@ export async function subscribeUserToPush(): Promise { apolloProvider.defaultClient as ApolloClient; const registration = await navigator.serviceWorker.ready; - const { data } = await client.mutate<{ config: IConfig }>({ - mutation: WEB_PUSH, + const { data } = await client.query<{ config: IConfig }>({ + query: WEB_PUSH, }); if (data?.config?.webPush?.enabled && data?.config?.webPush?.publicKey) {