Skip to content

Commit

Permalink
Use non-node friendly aggregate error (#1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 23, 2020
1 parent 6bb170f commit 163f714
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/delegate/package.json
Expand Up @@ -20,11 +20,11 @@
"dependencies": {
"@graphql-tools/schema": "6.0.10",
"@graphql-tools/utils": "6.0.10",
"aggregate-error": "3.0.1",
"@ardatan/aggregate-error": "0.0.1",
"tslib": "~2.0.0"
},
"publishConfig": {
"access": "public",
"directory": "dist"
}
}
}
2 changes: 1 addition & 1 deletion packages/delegate/src/delegateToSchema.ts
Expand Up @@ -22,7 +22,7 @@ import { isSubschemaConfig } from './Subschema';
import { createRequestFromInfo, getDelegatingOperation } from './createRequest';
import { Transformer } from './Transformer';

import AggregateError from 'aggregate-error';
import AggregateError from '@ardatan/aggregate-error';

export function delegateToSchema(options: IDelegateToSchemaOptions | GraphQLSchema): any {
if (isSchema(options)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/delegate/src/results/handleNull.ts
@@ -1,6 +1,6 @@
import { GraphQLError } from 'graphql';

import AggregateError from 'aggregate-error';
import AggregateError from '@ardatan/aggregate-error';
import { getErrorsByPathSegment, relocatedError } from '@graphql-tools/utils';

export function handleNull(errors: ReadonlyArray<GraphQLError>) {
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/package.json
Expand Up @@ -21,11 +21,11 @@
"graphql-scalars": "1.1.7"
},
"dependencies": {
"aggregate-error": "3.0.1",
"@ardatan/aggregate-error": "0.0.1",
"camel-case": "4.1.1"
},
"publishConfig": {
"access": "public",
"directory": "dist"
}
}
}
2 changes: 1 addition & 1 deletion packages/utils/src/validate-documents.ts
Expand Up @@ -9,7 +9,7 @@ import {
ASTVisitor,
} from 'graphql';
import { Source } from './loaders';
import AggregateError from 'aggregate-error';
import AggregateError from '@ardatan/aggregate-error';

export type ValidationRule = (context: ValidationContext) => ASTVisitor;
const DEFAULT_EFFECTIVE_RULES = createDefaultRules();
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/tests/validate-documents.spec.ts
@@ -1,6 +1,6 @@
import { checkValidationErrors, validateGraphQlDocuments } from '../src';
import { buildSchema, parse, GraphQLError } from 'graphql';
import AggregateError from 'aggregate-error';
import AggregateError from '@ardatan/aggregate-error';

describe('validateGraphQlDocuments', () => {
it('Should throw an informative error when validation errors happens, also check for fragments validation even why they are duplicated', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/wrap/src/introspect.ts
Expand Up @@ -9,7 +9,7 @@ import {

import { ExecutionResult } from '@graphql-tools/utils';
import { AsyncExecutor, SyncExecutor } from '@graphql-tools/delegate';
import AggregateError from 'aggregate-error';
import AggregateError from '@ardatan/aggregate-error';

function getSchemaFromIntrospection(introspectionResult: ExecutionResult<IntrospectionQuery>): GraphQLSchema {
if (introspectionResult?.data?.__schema) {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -35,6 +35,11 @@
dependencies:
xss "^1.0.6"

"@ardatan/aggregate-error@0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@ardatan/aggregate-error/-/aggregate-error-0.0.1.tgz#1403ac5de10d8ca689fc1f65844c27179ae1d44f"
integrity sha512-UQ9BequOTIavs0pTHLMwQwKQF8tTV1oezY/H2O9chA+JNPFZSua55xpU5dPSjAU9/jLJ1VwU+HJuTVN8u7S6Fg==

"@babel/code-frame@7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
Expand Down

0 comments on commit 163f714

Please sign in to comment.