Skip to content

Commit cb7ba25

Browse files
committed
fix(northwind): ORDER_REMOVED now correctly publish event
1 parent bc7f69a commit cb7ba25

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/northwind/schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ schemaComposer.Mutation.addFields({
119119
removeOrder: orderRemoveOneResolver.withMiddlewares([
120120
async (next, s, a, c, i) => {
121121
const res = await next(s, a, c, i);
122-
if (res?.recordId) pubsub.publish('ORDER_REMOVED', res?.recordId);
122+
if (res?.record?._id) pubsub.publish('ORDER_REMOVED', res?.record?._id);
123123
return res;
124124
},
125125
]),

tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
"rootDir": "./",
2323
"outDir": "./dist",
2424
},
25-
"include": ["**/*"],
25+
"include": ["examples/**/*", "scripts/**/*"],
2626
"exclude": [
27-
"./node_modules"
27+
"./node_modules",
28+
"./dist"
2829
]
2930
}

0 commit comments

Comments
 (0)