Skip to content

Commit 5212c85

Browse files
committed
Make sure 'ctx.node' is defined for the V4 adaptor
1 parent 3e43ad6 commit 5212c85

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

@app/lib/src/GraphileApolloLink.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export class GraphileApolloLink extends ApolloLink {
6262
await hookArgs(
6363
args,
6464
{
65+
node: {
66+
req,
67+
res,
68+
},
6569
expressv4: {
6670
req,
6771
res,

@app/server/__tests__/helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ export const runGraphQLQuery = async function runGraphQLQuery(
174174
},
175175
variableValues: variables,
176176
};
177-
await hookArgs(args, { node: { req, res } }, resolvedPreset);
177+
await hookArgs(
178+
args,
179+
{ node: { req, res }, expressv4: { req, res } },
180+
resolvedPreset
181+
);
178182

179183
// Because we're connected as the database owner, we should manually switch to
180184
// the authenticator role

0 commit comments

Comments
 (0)