Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions modules/ROOT/pages/directives/custom-logic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,17 @@ Global variables are available for use within the Cypher statement, and can be a
a|
[source, graphql, indent=0]
----
{
Movie {
title
actors: ACTED_IN @this {
role
actor {
name
}
}
directors: DIRECTED @this {
director {
name
}
}
}
type Movie {
title: String
similarMovies(limit: Int = 10): [Movie]
@cypher(
statement: """
MATCH (this)<-[:ACTED_IN]-(:Actor)-[:ACTED_IN]->(rec:Movie)
WITH rec, COUNT(*) AS score ORDER BY score DESC
RETURN rec LIMIT $limit
""",
columnName: "rec"
)
}
----

Expand Down
Loading