-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Server: support remote relationships to unions, interfaces and enum types #6080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
codingkarthik
merged 13 commits into
hasura:master
from
codingkarthik:remote-relationships-unions-interfaces
Oct 29, 2020
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
34ffe55
add support for joining to remote interface and union fields
codingkarthik d01042c
add test for making a remote relationship with an Union type
codingkarthik a413696
add CHANGELOG
codingkarthik 72dd913
remove the pretty-simple library
codingkarthik f9c89f5
remove unused imports from Remote.hs
codingkarthik 6a0ae34
Apply suggestions from code review
codingkarthik f03c9a8
Merge branch 'master' into remote-relationships-unions-interfaces
codingkarthik 9b1c2d0
support remote relationships against enum fields as well
codingkarthik e76fd67
update CHANGELOG
codingkarthik d9e166a
Merge branch 'master' into remote-relationships-unions-interfaces
codingkarthik 21b4ff8
Merge branch 'master' into remote-relationships-unions-interfaces
codingkarthik 63ac513
Merge branch 'master' into remote-relationships-unions-interfaces
kodiakhq[bot] 16bf906
Merge branch 'master' into remote-relationships-unions-interfaces
codingkarthik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
20 changes: 20 additions & 0 deletions
20
server/tests-py/queries/remote_schemas/remote_relationships/remote_rel_enum.yaml
This file contains hidden or 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,20 @@ | ||
| description: Simple remote relationship GraphQL query with union | ||
| url: /v1/graphql | ||
| status: 200 | ||
| response: | ||
| data: | ||
| profiles: | ||
| - id: 1 | ||
| getOccupationEnum: "SINGER" | ||
| - id: 2 | ||
| getOccupationEnum: "ARTIST" | ||
| - id: 3 | ||
| getOccupationEnum: "SINGER" | ||
| query: | ||
| query: | | ||
| query { | ||
| profiles { | ||
| id | ||
| getOccupationEnum | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
server/tests-py/queries/remote_schemas/remote_relationships/remote_rel_union.yaml
This file contains hidden or 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,30 @@ | ||
| description: Simple remote relationship GraphQL query with union | ||
| url: /v1/graphql | ||
| status: 200 | ||
| response: | ||
| data: | ||
| profiles: | ||
| - id: 1 | ||
| searchUnion: | ||
| title: "Harry Porter and the prisoner of Azkaban" | ||
| - id: 2 | ||
| searchUnion: | ||
| name: "J.K. Rowling" | ||
| - id: 3 | ||
| searchUnion: | ||
| title: "Harry Porter and the philoshoper's stone" | ||
| query: | ||
| query: | | ||
| query { | ||
| profiles { | ||
| id | ||
| searchUnion { | ||
| ... on Author { | ||
| name | ||
| } | ||
| ... on Book { | ||
| title | ||
| } | ||
| } | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
server/tests-py/queries/remote_schemas/remote_relationships/setup_remote_rel_with_enum.yaml
This file contains hidden or 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,11 @@ | ||
| type: create_remote_relationship | ||
| args: | ||
| name: getOccupationEnum | ||
| table: profiles | ||
| hasura_fields: | ||
| - name | ||
| remote_schema: my-remote-schema | ||
| remote_field: | ||
| getOccupation: | ||
| arguments: | ||
| name: $name |
11 changes: 11 additions & 0 deletions
11
server/tests-py/queries/remote_schemas/remote_relationships/setup_remote_rel_with_union.yaml
This file contains hidden or 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,11 @@ | ||
| type: create_remote_relationship | ||
| args: | ||
| name: searchUnion | ||
| table: profiles | ||
| hasura_fields: | ||
| - id | ||
| remote_schema: my-remote-schema | ||
| remote_field: | ||
| search: | ||
| arguments: | ||
| id: $id |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.