Skip to content

Commit fb46e96

Browse files
committed
Remove extra with
1 parent 0cb4297 commit fb46e96

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/graphql/src/translate/queryAST/ast/operations/ConnectionReadOperation.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,10 @@ export class ConnectionReadOperation extends Operation {
135135
nodeAndRelationshipMap.set("relationship", nestedContext.relationship);
136136
}
137137

138-
const extraColumnsVariables = extraColumns.map((c) => c[1]);
139-
140138
const withClause = new Cypher.With([Cypher.collect(nodeAndRelationshipMap), edgesVar], ...extraColumns);
141139

142140
if (this.hasTotalCount) {
143-
return withClause.with(edgesVar, [Cypher.size(edgesVar), totalCount], ...extraColumnsVariables);
141+
withClause.addColumns([Cypher.count(nestedContext.target), totalCount]);
144142
}
145143
return withClause;
146144
}

0 commit comments

Comments
 (0)