Skip to content

Commit 100051f

Browse files
committed
addressing comments
1 parent 6fa8dfa commit 100051f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/runtime/src/client/executor/zenstack-query-executor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class ZenStackQueryExecutor<Schema extends SchemaDef> extends DefaultQuer
139139
try {
140140
return await this.provideConnection(async (connection) => {
141141
if (this.suppressMutationHooks || !this.isMutationNode(query) || !this.hasEntityMutationPlugins) {
142-
// non-mutation query or hooks suppressed, just proceed
142+
// no need to handle mutation hooks, just proceed
143143
const finalQuery = this.nameMapper.transformNode(query);
144144
compiled = this.compileQuery(finalQuery);
145145
if (parameters) {
@@ -174,8 +174,8 @@ export class ZenStackQueryExecutor<Schema extends SchemaDef> extends DefaultQuer
174174

175175
const mutationInfo = this.getMutationInfo(finalQuery);
176176

177-
let beforeMutationEntities: Record<string, unknown>[] | undefined = undefined;
178-
177+
// cache already loaded before-mutation entities
178+
let beforeMutationEntities: Record<string, unknown>[] | undefined;
179179
const loadBeforeMutationEntities = async () => {
180180
if (
181181
beforeMutationEntities === undefined &&

0 commit comments

Comments
 (0)