upgrade graphql-tools to v6 (#6701)

* upgrade to v6

* remove old graphql-tools package

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
This commit is contained in:
Yaacov Rydzinski
2020-05-25 02:35:45 -04:00
committed by GitHub
parent ddf99a1a43
commit f56049b34b
5 changed files with 130 additions and 42 deletions

View File

@@ -5,7 +5,8 @@ import {
DocumentNode,
GraphQLNamedType,
} from 'graphql';
import { mergeSchemas, SchemaDirectiveVisitor } from 'graphql-tools';
import { stitchSchemas } from '@graphql-tools/stitch';
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
import requiredParameter from '../requiredParameter';
import * as defaultGraphQLTypes from './loaders/defaultGraphQLTypes';
import * as parseClassTypes from './loaders/parseClassTypes';
@@ -251,7 +252,7 @@ class ParseGraphQLSchema {
}
}
);
this.graphQLSchema = mergeSchemas({
this.graphQLSchema = stitchSchemas({
schemas: [
this.graphQLSchemaDirectivesDefinitions,
this.graphQLAutoSchema,
@@ -262,10 +263,10 @@ class ParseGraphQLSchema {
this.graphQLSchema = await this.graphQLCustomTypeDefs({
directivesDefinitionsSchema: this.graphQLSchemaDirectivesDefinitions,
autoSchema: this.graphQLAutoSchema,
mergeSchemas,
stitchSchemas,
});
} else {
this.graphQLSchema = mergeSchemas({
this.graphQLSchema = stitchSchemas({
schemas: [
this.graphQLSchemaDirectivesDefinitions,
this.graphQLAutoSchema,