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 124130e commit fc9afeeCopy full SHA for fc9afee
1 file changed
src/common/useApi.ts
@@ -19,7 +19,7 @@ let component_name_map = null;
19
20
const graphql_cache = new InMemoryCache();
21
// @ts-ignore
22
-const oauth_link = new SetContextLink(async (_, { headers }) => {
+const oauth_link = new SetContextLink(async ({ headers }) => {
23
const { getAuthToken, refreshAuthToken } = useAuth();
24
await refreshAuthToken();
25
return {
@@ -181,6 +181,11 @@ export function useApi() {
181
query: gql`${query}`,
182
fetchPolicy: fetchPolicy,
183
errorPolicy: errorPolicy,
184
+ context: {
185
+ headers: {
186
+ ...getSessionHeaders()
187
+ }
188
189
});
190
};
191
0 commit comments