Skip to content

Commit ae0b20b

Browse files
authored
fix: disable apollo devtools for server-side clients (#1431)
1 parent 832ae17 commit ae0b20b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/js/graphql/ServerClient.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const timeoutLink = new ApolloLink((operation, forward) => {
3636
export const { getClient, query, PreloadQuery } = registerApolloClient(() => {
3737
return new ApolloClient({
3838
cache: new InMemoryCache(),
39-
link: ApolloLink.from([timeoutLink, dynamicTagsLink, httpLink])
39+
link: ApolloLink.from([timeoutLink, dynamicTagsLink, httpLink]),
40+
devtools: { enabled: false }
4041
})
4142
})
4243

@@ -47,6 +48,7 @@ export const { getClient, query, PreloadQuery } = registerApolloClient(() => {
4748
export function getGlobalClient (): ApolloClient<any> {
4849
return new ApolloClient({
4950
cache: new InMemoryCache(),
50-
link: ApolloLink.from([timeoutLink, dynamicTagsLink, httpLink])
51+
link: ApolloLink.from([timeoutLink, dynamicTagsLink, httpLink]),
52+
devtools: { enabled: false }
5153
})
5254
}

0 commit comments

Comments
 (0)