-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Navigating past an
@optional
edge should disable many hints. (#254)
Or else it's a footgun that adapters are pretty much guaranteed to fall for.
- Loading branch information
1 parent
6565458
commit 2611481
Showing
10 changed files
with
1,706 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
...t_data/tests/valid_queries/recurse_then_nested_required_edge_depth_two.graphql-parsed.ron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Ok(TestParsedGraphQLQuery( | ||
schema_name: "numbers", | ||
query: Query( | ||
root_connection: FieldConnection( | ||
position: Pos( | ||
line: 3, | ||
column: 5, | ||
), | ||
name: "Two", | ||
), | ||
root_field: FieldNode( | ||
position: Pos( | ||
line: 3, | ||
column: 5, | ||
), | ||
name: "Two", | ||
connections: [ | ||
(FieldConnection( | ||
position: Pos( | ||
line: 4, | ||
column: 9, | ||
), | ||
name: "successor", | ||
recurse: Some(RecurseDirective( | ||
depth: 2, | ||
)), | ||
), FieldNode( | ||
position: Pos( | ||
line: 4, | ||
column: 9, | ||
), | ||
name: "successor", | ||
connections: [ | ||
(FieldConnection( | ||
position: Pos( | ||
line: 5, | ||
column: 13, | ||
), | ||
name: "predecessor", | ||
), FieldNode( | ||
position: Pos( | ||
line: 5, | ||
column: 13, | ||
), | ||
name: "predecessor", | ||
connections: [ | ||
(FieldConnection( | ||
position: Pos( | ||
line: 6, | ||
column: 17, | ||
), | ||
name: "predecessor", | ||
), FieldNode( | ||
position: Pos( | ||
line: 6, | ||
column: 17, | ||
), | ||
name: "predecessor", | ||
connections: [ | ||
(FieldConnection( | ||
position: Pos( | ||
line: 7, | ||
column: 21, | ||
), | ||
name: "value", | ||
), FieldNode( | ||
position: Pos( | ||
line: 7, | ||
column: 21, | ||
), | ||
name: "value", | ||
output: [ | ||
OutputDirective(), | ||
], | ||
)), | ||
], | ||
)), | ||
], | ||
)), | ||
], | ||
)), | ||
], | ||
), | ||
), | ||
)) |
16 changes: 16 additions & 0 deletions
16
...ore/test_data/tests/valid_queries/recurse_then_nested_required_edge_depth_two.graphql.ron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
TestGraphQLQuery ( | ||
schema_name: "numbers", | ||
query: r#" | ||
{ | ||
Two { | ||
successor @recurse(depth: 2) { | ||
predecessor { | ||
predecessor { | ||
value @output | ||
} | ||
} | ||
} | ||
} | ||
}"#, | ||
arguments: {}, | ||
) |
57 changes: 57 additions & 0 deletions
57
...all_core/test_data/tests/valid_queries/recurse_then_nested_required_edge_depth_two.ir.ron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Ok(TestIRQuery( | ||
schema_name: "numbers", | ||
ir_query: IRQuery( | ||
root_name: "Two", | ||
root_component: IRQueryComponent( | ||
root: Vid(1), | ||
vertices: { | ||
Vid(1): IRVertex( | ||
vid: Vid(1), | ||
type_name: "Prime", | ||
), | ||
Vid(2): IRVertex( | ||
vid: Vid(2), | ||
type_name: "Number", | ||
), | ||
Vid(3): IRVertex( | ||
vid: Vid(3), | ||
type_name: "Number", | ||
), | ||
Vid(4): IRVertex( | ||
vid: Vid(4), | ||
type_name: "Number", | ||
), | ||
}, | ||
edges: { | ||
Eid(1): IREdge( | ||
eid: Eid(1), | ||
from_vid: Vid(1), | ||
to_vid: Vid(2), | ||
edge_name: "successor", | ||
recursive: Some(Recursive( | ||
depth: 2, | ||
)), | ||
), | ||
Eid(2): IREdge( | ||
eid: Eid(2), | ||
from_vid: Vid(2), | ||
to_vid: Vid(3), | ||
edge_name: "predecessor", | ||
), | ||
Eid(3): IREdge( | ||
eid: Eid(3), | ||
from_vid: Vid(3), | ||
to_vid: Vid(4), | ||
edge_name: "predecessor", | ||
), | ||
}, | ||
outputs: { | ||
"value": ContextField( | ||
vertex_id: Vid(4), | ||
field_name: "value", | ||
field_type: "Int", | ||
), | ||
}, | ||
), | ||
), | ||
)) |
Oops, something went wrong.