forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate relationship definition for nested selection (hasura#855)
### What Previously, while generating relationship definitions for NDC, we would ignore columns with nested selection. This PR fixes that. Closes https://hasurahq.atlassian.net/browse/V3ENGINE-247 ### How While matching on `FieldSelection::Column`, don't ignore it. Check if it contains nested selection, if it does, call `collect_relationships_from_nested_selection` V3_GIT_ORIGIN_REV_ID: 9db94744d8e2d35f8430bded07209ef519175205
- Loading branch information
1 parent
a6dbc7b
commit 9eaabd1
Showing
25 changed files
with
516 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
93 changes: 93 additions & 0 deletions
93
v3/crates/engine/tests/execute/models/select_many/nested_select/relationship/expected.json
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,93 @@ | ||
{ | ||
"data": { | ||
"InstitutionMany": [ | ||
{ | ||
"id": 1, | ||
"location": { | ||
"city": "London", | ||
"campuses": [ | ||
"Mile End", | ||
"Whitechapel", | ||
"Charterhouse Square", | ||
"West Smithfield" | ||
] | ||
}, | ||
"location_country": { | ||
"country": "UK" | ||
}, | ||
"staff": [ | ||
{ | ||
"last_name": "Landin", | ||
"specialities": ["Computer Science", "Education"], | ||
"actor": { | ||
"name": "Peter" | ||
} | ||
} | ||
], | ||
"staff_first_name": [ | ||
{ | ||
"first_name": "Peter" | ||
} | ||
], | ||
"departments": [ | ||
"Humanities and Social Sciences", | ||
"Science and Engineering", | ||
"Medicine and Dentistry" | ||
] | ||
}, | ||
{ | ||
"id": 2, | ||
"location": { | ||
"city": "Gothenburg", | ||
"campuses": ["Johanneberg", "Lindholmen"] | ||
}, | ||
"location_country": { | ||
"country": "Sweden" | ||
}, | ||
"staff": [ | ||
{ | ||
"last_name": "Hughes", | ||
"specialities": [ | ||
"Computer Science", | ||
"Functional Programming", | ||
"Software Testing" | ||
], | ||
"actor": null | ||
}, | ||
{ | ||
"last_name": "Claessen", | ||
"specialities": [ | ||
"Computer Science", | ||
"Functional Programming", | ||
"Automated Reasoning" | ||
], | ||
"actor": null | ||
} | ||
], | ||
"staff_first_name": [ | ||
{ | ||
"first_name": "John" | ||
}, | ||
{ | ||
"first_name": "Koen" | ||
} | ||
], | ||
"departments": [ | ||
"Architecture and Civil Engineering", | ||
"Computer Science and Engineering", | ||
"Electrical Engineering", | ||
"Physics", | ||
"Industrial and Materials Science" | ||
] | ||
}, | ||
{ | ||
"id": 3, | ||
"location": null, | ||
"location_country": null, | ||
"staff": null, | ||
"staff_first_name": null, | ||
"departments": ["nothing", null] | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.