Change apollo graphql client headers after user login #9741
Replies: 2 comments 1 reply
-
Have a look at vuejs/apollo#713. |
Beta Was this translation helpful? Give feedback.
-
I just added token support to my Quasar version 1.0 app using Apollo Client version 3.0. This is my boot file (apolloClient.js) for Apollo client. Hope this helps. import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client/core' // We are using Window.localStorage API for token const apolloProvider = new VueApollo({ export { apolloProvider } All of my graphql requests are done in Vuex. So the at the top of my store file (auth.js) I have ` const gqlClient = apolloProvider.defaultClient` |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm working on an app that needed to set auth token header after the user login. I noticed apollo client-initiated before the app. So is there a way to change heders after the certain view is loaded?
Beta Was this translation helpful? Give feedback.
All reactions