Skip to content
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

Fix mergeProxiedResults errors aggregation #1621

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -43,7 +43,7 @@
"jest": "26.0.1",
"ts-jest": "26.1.0",
"typescript": "3.9.5",
"@typescript-eslint/eslint-plugin": "3.1.0",
"@typescript-eslint/eslint-plugin": "3.2.0",
"@typescript-eslint/parser": "3.2.0",
"bob-the-bundler": "1.0.2",
"eslint": "7.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/delegate/src/proxiedResult.ts
Expand Up @@ -68,7 +68,7 @@ export function dehoistResult(parent: any, delimeter = '__gqltf__'): any {
}

export function mergeProxiedResults(target: any, ...sources: any): any {
const errors = target[ERROR_SYMBOL].concat(sources.map((source: any) => source[ERROR_SYMBOL]));
const errors = target[ERROR_SYMBOL].concat(...sources.map((source: any) => source[ERROR_SYMBOL]));
const fieldSubschemaMap = sources.reduce((acc: Record<any, SubschemaConfig>, source: any) => {
const subschema = source[OBJECT_SUBSCHEMA_SYMBOL];
Object.keys(source).forEach(key => {
Expand Down
33 changes: 5 additions & 28 deletions yarn.lock
Expand Up @@ -2345,27 +2345,17 @@
dependencies:
"@types/yargs-parser" "*"

"@typescript-eslint/eslint-plugin@3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.1.0.tgz#4ac00ecca3bbea740c577f1843bc54fa69c3def2"
integrity sha512-D52KwdgkjYc+fmTZKW7CZpH5ZBJREJKZXRrveMiRCmlzZ+Rw9wRVJ1JAmHQ9b/+Ehy1ZeaylofDB9wwXUt83wg==
"@typescript-eslint/eslint-plugin@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.2.0.tgz#7fb997f391af32ae6ca1dbe56bcefe4dd30bda14"
integrity sha512-t9RTk/GyYilIXt6BmZurhBzuMT9kLKw3fQoJtK9ayv0tXTlznXEAnx07sCLXdkN3/tZDep1s1CEV95CWuARYWA==
dependencies:
"@typescript-eslint/experimental-utils" "3.1.0"
"@typescript-eslint/experimental-utils" "3.2.0"
functional-red-black-tree "^1.0.1"
regexpp "^3.0.0"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/experimental-utils@3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.1.0.tgz#2d5dba7c2ac2a3da3bfa3f461ff64de38587a872"
integrity sha512-Zf8JVC2K1svqPIk1CB/ehCiWPaERJBBokbMfNTNRczCbQSlQXaXtO/7OfYz9wZaecNvdSvVADt6/XQuIxhC79w==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "3.1.0"
eslint-scope "^5.0.0"
eslint-utils "^2.0.0"

"@typescript-eslint/experimental-utils@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.2.0.tgz#4dab8fc9f44f059ec073470a81bb4d7d7d51e6c5"
Expand All @@ -2386,19 +2376,6 @@
"@typescript-eslint/typescript-estree" "3.2.0"
eslint-visitor-keys "^1.1.0"

"@typescript-eslint/typescript-estree@3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.1.0.tgz#eaff52d31e615e05b894f8b9d2c3d8af152a5dd2"
integrity sha512-+4nfYauqeQvK55PgFrmBWFVYb6IskLyOosYEmhH3mSVhfBp9AIJnjExdgDmKWoOBHRcPM8Ihfm2BFpZf0euUZQ==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^7.3.2"
tsutils "^3.17.1"

"@typescript-eslint/typescript-estree@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.2.0.tgz#c735f1ca6b4d3cd671f30de8c9bde30843e7ead8"
Expand Down