From bd4afbafeb70800f7160f395729217ef6b1897e6 Mon Sep 17 00:00:00 2001 From: Alexandre Monjol Date: Fri, 29 Nov 2024 10:52:03 +0100 Subject: [PATCH] misc: recast type to remove ts expected error comment --- src/core/apolloClient/init.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/apolloClient/init.ts b/src/core/apolloClient/init.ts index d8ba7df96..9925bfd91 100644 --- a/src/core/apolloClient/init.ts +++ b/src/core/apolloClient/init.ts @@ -65,8 +65,9 @@ export const initializeApolloClient = async () => { silentErrorCodes.push(...AUTH_ERRORS, LagoApiError.Forbidden) if (graphQLErrors) { - // @ts-expect-error - graphQLErrors.forEach(({ message, locations, path, extensions }: LagoGQLError) => { + graphQLErrors.forEach((value) => { + const { message, path, locations, extensions } = value as LagoGQLError + const isUnauthorized = extensions && AUTH_ERRORS.includes(extensions?.code) if (isUnauthorized && globalApolloClient) { @@ -100,11 +101,10 @@ export const initializeApolloClient = async () => { console.warn(`[Network error]: ${JSON.stringify(networkError)}`) } }), - // afterwareLink.concat( + createUploadLink({ uri: `${apiUrl}/graphql`, }) as unknown as ApolloLink, - // ), ] await persistCache({