You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val expected ="""MATCH (person:Person) RETURN person { name:apoc.cypher.runFirstColumnSingle('WITH ${"$"}this AS this RETURN this.name',{this:person}) } AS person"""
37
38
val query ="""{ person { name }}"""
38
39
assertQuery(query, expected, emptyMap())
39
40
}
40
41
42
+
@Test
43
+
funrenderCypherFieldDirectiveNested() {
44
+
val expected ="""MATCH (person:Person) RETURN person { friends:[personFriends IN apoc.cypher.runFirstColumnMany('WITH ${"$"}this AS this MATCH (this)-[:KNOWS]-(o) RETURN o',{this:person}) | personFriends { .id }] } AS person"""
val expected ="""MATCH (person:Person) RETURN person { age:apoc.cypher.runFirstColumnMany('WITH ${"$"}this AS this,${'$'}mult AS mult RETURN this.age * mult as age',{this:person,mult:${'$'}personMult}) } AS person"""
Copy file name to clipboardExpand all lines: src/test/resources/movie-test.md
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
```
8
8
9
-
### Basic Test
9
+
### Basic Query with Parameter
10
10
11
11
```graphql
12
12
{ Movie(title: "River Runs Through It, A") { title } }
@@ -20,7 +20,7 @@ WHERE movie.title = $movieTitle
20
20
RETURN movie { .title } AS movie
21
21
```
22
22
23
-
### Testing Paging
23
+
### Paging
24
24
25
25
```graphql
26
26
{
@@ -42,7 +42,7 @@ RETURN movie { .title , .year } AS movie
42
42
SKIP $offset LIMIT $first
43
43
```
44
44
45
-
### Testing Projection
45
+
### Relationship Expansion
46
46
47
47
```graphql
48
48
{
@@ -65,7 +65,7 @@ WHERE movie.title = $movieTitle
65
65
RETURN movie { .title,actors:[(movie)<-[:ACTED_IN]-(movieActors:Actor) | movieActors { .name }] } AS movie
66
66
```
67
67
68
-
### Testing Projection with sub-paging
68
+
### Projection with sub-paging
69
69
70
70
```graphql
71
71
{
@@ -87,3 +87,24 @@ MATCH (movie:Movie)
87
87
WHERE movie.title = $movieTitle
88
88
RETURN movie { .title,actors:[(movie)<-[:ACTED_IN]-(movieActors:Actor) | movieActors { .name }][0..3] } AS movie
89
89
```
90
+
### Subquery Cypher Directive
91
+
92
+
```graphql
93
+
{
94
+
Movie {
95
+
title
96
+
similar {
97
+
title
98
+
}
99
+
}
100
+
}
101
+
```
102
+
103
+
```params
104
+
{}
105
+
```
106
+
107
+
```cypher
108
+
MATCH (movie:Movie)
109
+
RETURN movie { .title,similar:[movieSimilar IN apoc.cypher.runFirstColumnMany('WITH $this AS this,$first AS first,$offset AS offset MATCH (this)--(:Genre)--(o:Movie) RETURN o',{this:movie,first:$movieFirst,offset:$movieOffset}) | movieSimilar { .title }] } AS movie
0 commit comments