@@ -73,17 +73,20 @@ describe("https://github.com/neo4j/graphql/issues/6031", () => {
73
73
74
74
expect ( formatCypher ( result . cypher ) ) . toMatchInlineSnapshot ( `
75
75
"CALL {
76
- MATCH (this0:Series)
77
- WHERE this0:Movie
78
- WITH { node: { __resolveType: \\"Series\\", __id: id(this0), title: this0.title } } AS edge
79
- RETURN edge
80
- UNION
81
- MATCH (this1:Movie)
82
- WHERE this1:Movie
83
- WITH { node: { __resolveType: \\"Movie\\", __id: id(this1), title: this1.title } } AS edge
84
- RETURN edge
76
+ CALL {
77
+ MATCH (this0:Series)
78
+ WHERE this0:Movie
79
+ WITH { node: { __resolveType: \\"Series\\", __id: id(this0), title: this0.title } } AS edge
80
+ RETURN edge
81
+ UNION
82
+ MATCH (this1:Movie)
83
+ WHERE this1:Movie
84
+ WITH { node: { __resolveType: \\"Movie\\", __id: id(this1), title: this1.title } } AS edge
85
+ RETURN edge
86
+ }
87
+ RETURN collect(edge) AS edges
85
88
}
86
- WITH collect(edge) AS edges
89
+ WITH edges
87
90
WITH edges, size(edges) AS totalCount
88
91
RETURN { edges: edges, totalCount: totalCount } AS this"
89
92
` ) ;
@@ -125,18 +128,22 @@ describe("https://github.com/neo4j/graphql/issues/6031", () => {
125
128
WITH this0
126
129
CALL {
127
130
WITH this0
128
- MATCH (this0)-[this1:ACTED_IN]->(this2:Series)
129
- WHERE this2:Movie
130
- WITH { node: { __resolveType: \\"Series\\", __id: id(this2), title: this2.title } } AS edge
131
- RETURN edge
132
- UNION
133
- WITH this0
134
- MATCH (this0)-[this3:ACTED_IN]->(this4:Movie)
135
- WHERE this4:Movie
136
- WITH { node: { __resolveType: \\"Movie\\", __id: id(this4), title: this4.title } } AS edge
137
- RETURN edge
131
+ CALL {
132
+ WITH this0
133
+ MATCH (this0)-[this1:ACTED_IN]->(this2:Series)
134
+ WHERE this2:Movie
135
+ WITH { node: { __resolveType: \\"Series\\", __id: id(this2), title: this2.title } } AS edge
136
+ RETURN edge
137
+ UNION
138
+ WITH this0
139
+ MATCH (this0)-[this3:ACTED_IN]->(this4:Movie)
140
+ WHERE this4:Movie
141
+ WITH { node: { __resolveType: \\"Movie\\", __id: id(this4), title: this4.title } } AS edge
142
+ RETURN edge
143
+ }
144
+ RETURN collect(edge) AS edges
138
145
}
139
- WITH collect(edge) AS edges
146
+ WITH edges
140
147
WITH edges, size(edges) AS totalCount
141
148
RETURN { edges: edges, totalCount: totalCount } AS var5
142
149
}
0 commit comments