-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update @requires test to verify the functionality
Updating `users` and `products` subgraph schemas to allow for testing the support of `@requires` functionality in the implementing subgraph. This is a breaking change as we modify the schema so all the existing implementations will be impacted. Changes: * `users` subgraph ```graphql type User @key(fields:"email") { email:ID! name: String totalProductsCreated: Int yearsOfEmployment: Int! # <-- new field } ``` * `products` subgraph ```graphql extend type User @key(fields: "email") { averageProductsCreatedPerYear: Int @requires(fields: "yearsOfEmployment") # <-- test `@requires` functionality email: ID! @external name: String @OverRide(from: "users") totalProductsCreated: Int @external yearsOfEmployment: Int! @external # <-- field from the users subgraph used by @requires } ``` Updated implementations: - [x] apollo-server - [x] federation-jvm - [x] graphql-kotlin Related Issues: * resolves #128
- Loading branch information
1 parent
971ff00
commit 6adf888
Showing
12 changed files
with
42 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
server: | ||
listen: 0.0.0.0:4000 | ||
cors: | ||
allow_credentials: true | ||
allow_credentials: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ type User @key(fields:"email") { | |
email:ID! | ||
name: String | ||
totalProductsCreated: Int | ||
yearsOfEmployment: Int! | ||
} |
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