We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In this link I've read how to set up httpLink with headers: {authorization: Bearer "+ getToken() } #30
I would also like to add a wsLink with: connectionParams: {headers: {authorisation: Bearer + getToken() } but I can't find any example on the internet
The text was updated successfully, but these errors were encountered:
@beebase That's how I implemented (not sure if this is the best approach, though):
const wsLink = new WebSocketLink({ uri: WS_GRAPHQL_ENDPOINT, options: { lazy: true, reconnect: true, connectionParams: async () => { const token = await getToken(); return { headers: { authorization: token ? `Bearer ${token}` : '', }, }; }, }, });
Sorry, something went wrong.
No branches or pull requests
In this link I've read how to set up httpLink with headers: {authorization: Bearer "+ getToken() }
#30
I would also like to add a wsLink with:
connectionParams: {headers: {authorisation: Bearer + getToken() }
but I can't find any example on the internet
The text was updated successfully, but these errors were encountered: