Can you share the full implementation here. Plz
G
Latest posts made by ghosteye1.wg
-
RE: How to update auth token using app-extension-apollo each time a user log in?
-
How I set Auth headers in apllo client after login
I’m using https://github.com/quasarframework/app-extension-apollo for graphql. The all config related to above plugin store in apollo-client-config.js file. Currently I implemented as follows
export default function (/* { app, router, store, ssrContext, urlPath, redirect } */) { return { default: { httpLinkConfig: { headers: { 'Authorization': 'Bearer ' +localStorage.getItem('access_token')}, uri: process.env.GRAPHQL_URI || 'http://localhost:8080/api/graphql' }, cacheConfig: {}, additionalConfig: {} }, ssrOnServer: { additionalConfig: { ssrMode: true } }, ssrOnClient: { additionalConfig: { ssrForceFetchDelay: 100 } } } }
I want set authorization header user after login.