-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
relax variables selection for subgraph queries (#755)
* relax variables selection for subgraph queries for federated subgraph queries, we encountered multiple issues: - if we got a null entity from a previous call, selecting data from it would return an error and fail the subgraph request. This is invalid, because for a request like `query { topProducts { reviews { body } } }` and a products subgraph returning `[ {"upc": 0}, null, { "upc": 2} ]`, we should do a query to the reviews subgraph for the products 0 and 2 - if the list of representations to query a subgraph is empty, we were still doing a HTTP request expecting an empty result this commit fixes those issues by ignoring selection errors when creating variables, then canceling the subgraph request if the representations array is empty * changelog and lint * Update CHANGELOG.md Co-authored-by: Bryn Cooke <BrynCooke@gmail.com> Co-authored-by: Bryn Cooke <BrynCooke@gmail.com>
- Loading branch information
Showing
4 changed files
with
41 additions
and
65 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