Skip to content

Commit a1a6695

Browse files
committed
jwt tokens fixed
1 parent 8d229d6 commit a1a6695

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/services/graphqlService.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ const server = new ApolloServer({
88
resolvers,
99
csrfPrevention: true,
1010
cache: "bounded",
11-
context: ({ event }) => {
12-
return { event };
13-
},
1411
});
1512

1613
const { url } = await startStandaloneServer(server, {
1714
listen: { port: 4000 },
15+
context: async ({ req }) => {
16+
// send the http req as event to match JWT methods
17+
return { event: req };
18+
},
1819
});
1920

2021
console.log(`Server ready at: ${url}`);

0 commit comments

Comments
 (0)