plexus-engine 0.3.6

Engine integration traits for consuming Plexus plans
Documentation
Feature: graph-ref conformance coverage

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-use-graph-accepts-with-graph-ref-capability
Given a fixture graph
When executing query:
"""
USE GRAPH social MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-use-graph-with-alias-accepts-with-graph-ref-capability
Given a fixture graph
When executing query:
"""
USE GRAPH social AS g MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-graph-clause-accepts-with-graph-ref-capability
Given a fixture graph
When executing query:
"""
GRAPH social MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-graph-clause-with-alias-accepts-with-graph-ref-capability
Given a fixture graph
When executing query:
"""
GRAPH social AS g MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql @cap-graph-ref-disabled
Scenario: gql-use-graph-rejected-when-graph-ref-capability-disabled
Given a fixture graph
When executing query:
"""
USE GRAPH social MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then an error should contain: "supports_graph_ref=false"
And no side effects

@readonly @match @gql @cap-graph-ref-disabled
Scenario: gql-use-graph-with-alias-rejected-when-graph-ref-capability-disabled
Given a fixture graph
When executing query:
"""
USE GRAPH social AS g MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then an error should contain: "supports_graph_ref=false"
And no side effects

@readonly @match @gql @cap-graph-ref-disabled
Scenario: gql-graph-clause-rejected-when-graph-ref-capability-disabled
Given a fixture graph
When executing query:
"""
GRAPH social MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then an error should contain: "supports_graph_ref=false"
And no side effects

@readonly @match @gql
Scenario: gql-use-graph-invalid-identifier-rejected
Given a fixture graph
When executing query:
"""
USE GRAPH 1bad MATCH (n:Person) RETURN n.name
"""
Then an error should contain: "invalid graph_ref"
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-catalog-qualified-graph-name-accepted-with-graph-ref-capability
Given a fixture graph
When executing query:
"""
GRAPH catalog.main MATCH (n:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql
Scenario: gql-graph-clause-with-invalid-alias-is-rejected
Given a fixture graph
When executing query:
"""
GRAPH social AS g.main MATCH (n:Person) RETURN n.name
"""
Then an error should contain: "graph selector alias must be a simple identifier"
And no side effects

@readonly @match @gql
Scenario: gql-use-graph-clause-with-invalid-alias-is-rejected
Given a fixture graph
When executing query:
"""
USE GRAPH social AS g.main MATCH (n:Person) RETURN n.name
"""
Then an error should contain: "graph selector alias must be a simple identifier"
And no side effects

@readonly @match @gql
Scenario: gql-use-graph-alias-standalone-reference-is-rejected
Given a fixture graph
When executing query:
"""
USE GRAPH social AS g MATCH (n:Person) RETURN g
"""
Then an error should contain: "graph aliases are namespace prefixes only; use the alias.variable form (e.g. g.n)"
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-graph-alias-in-expression-context-is-normalized
Given a fixture graph
When executing query:
"""
GRAPH social AS g MATCH (g.n:Person) RETURN g.n.name AS name ORDER BY name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql
Scenario: gql-use-graph-alias-plain-identifier-reference-is-rejected
Given a fixture graph
When executing query:
"""
USE GRAPH social AS g MATCH (g:Person) RETURN g
"""
Then an error should contain: "graph aliases are namespace prefixes only; use the alias.variable form (e.g. g.n)"
And no side effects

@readonly @match @gql @cap-graph-ref-enabled
Scenario: gql-graph-alias-reference-in-pattern-is-normalized
Given a fixture graph
When executing query:
"""
GRAPH social AS g MATCH (g.n:Person)-[:KNOWS]->(g.m:Person) RETURN n.name ORDER BY n.name
"""
Then the result should be, in order:
| Alice |
| Bob |
And no side effects

@readonly @match @gql
Scenario: gql-graph-selection-after-executable-clause-is-rejected
Given a fixture graph
When executing query:
"""
MATCH (n:Person) RETURN n GRAPH social MATCH (m:Person) RETURN m
"""
Then an error should contain: "graph selection clauses must appear before the first executable clause or immediately after NEXT"
And no side effects

@readonly @match @gql
Scenario: gql-multi-graph-switching-rejected-by-capability
Given a fixture graph
When executing query:
"""
USE GRAPH social MATCH (n:Person) RETURN n AS n NEXT USE GRAPH other MATCH (m:Person) RETURN n.name, m.name
"""
Then an error should contain: "supports_multi_graph=false"
And no side effects