We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b16902 commit 73b7e95Copy full SHA for 73b7e95
packages/iotex-react-block-producers/src/apollo-client.ts
@@ -8,12 +8,13 @@ import JsonGlobal from "safe-json-globals/get";
8
9
const state = isBrowser && JsonGlobal("state");
10
11
-export const createWebBpApolloClient = (uri: string) =>
+export const createWebBpApolloClient = (uri: string, clientId: string = "") =>
12
new ApolloClient({
13
ssrMode: !isBrowser,
14
link: new HttpLink({
15
uri,
16
- fetch
+ fetch,
17
+ headers: { "x-iotex-client-id": clientId }
18
}),
19
cache: isBrowser
20
? new InMemoryCache().restore(state.webBpApolloState)
0 commit comments