File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
modules/ROOT/pages/type-definitions/directives Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,17 @@ Global variables are available for use within the Cypher statement and can be ap
1919a|
2020[source, graphql, indent=0]
2121----
22- {
23- Movie {
24- title
25- actors: ACTED_IN @this {
26- role
27- actor {
28- name
29- }
30- }
31- directors: DIRECTED @this {
32- director {
33- name
34- }
35- }
36- }
22+ type Movie {
23+ title: String
24+ similarMovies(limit: Int = 10): [Movie]
25+ @cypher(
26+ statement: """
27+ MATCH (this)<-[:ACTED_IN]-(:Actor)-[:ACTED_IN]->(rec:Movie)
28+ WITH rec, COUNT(*) AS score ORDER BY score DESC
29+ RETURN rec LIMIT $limit
30+ """,
31+ columnName: "rec"
32+ )
3733}
3834----
3935
@@ -234,4 +230,4 @@ type Mutation {
234230 columnName: "a"
235231 )
236232}
237- ----
233+ ----
You can’t perform that action at this time.
0 commit comments