Apollo Client fix for authentication
This commit is contained in:
1 parent
2d198bacb8
commit
8914586a45
2 files changed
+8
-52
No files matched your search
@@ -22,11 +22,10 @@ export const createRemoteSchema = async (uri) => {
|
||||
const http = makeDatabaseServiceLink()
|
||||
|
||||
const authLink = setContext((request, previousContext) => {
|
||||
console.log(previousContext.graphqlContext.headers)
|
||||
return (
|
||||
{
|
||||
headers: {
|
||||
Authorization: previousContext.graphqlContext.headers.Authorization ? previousContext.graphqlContext.headers.Authorization : ''
|
||||
Authorization: previousContext.graphqlContext.headers.authorization ? previousContext.graphqlContext.headers.authorization : ''
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user