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) {