Feature: gql expression conformance coverage (arith/param/case)
@readonly @return @gql
Scenario: gql-case-expression-lowers-and-executes
Given a fixture graph
When executing query:
"""
MATCH (n:Person)
RETURN CASE WHEN n.age > 30 THEN "senior" ELSE "junior" END AS bucket
ORDER BY bucket
"""
Then the result should be, in order:
| string:junior |
| string:senior |
And no side effects
@readonly @return @gql
Scenario: gql-arithmetic-operator-lowers-and-executes
Given a fixture graph
When executing query:
"""
MATCH (n:Person)
RETURN n.age + 1 AS next_age
ORDER BY next_age
"""
Then the result should be, in order:
| int:31 |
| int:41 |
And no side effects
@readonly @where @return @gql
Scenario: gql-parameter-token-reports-unbound-parameter-at-runtime
Given a fixture graph
When executing query:
"""
MATCH (n:Person)
FILTER n.name = $name
RETURN n.name
"""
Then an error should contain: "unbound parameter"
And no side effects