Skip to content

Commit f56049b

Browse files
yaacovCRdavimacedo
andauthored
upgrade graphql-tools to v6 (#6701)
* upgrade to v6 * remove old graphql-tools package Co-authored-by: Antonio Davi Macedo Coelho de Castro <[email protected]>
1 parent ddf99a1 commit f56049b

File tree

5 files changed

+130
-42
lines changed

5 files changed

+130
-42
lines changed

package-lock.json

Lines changed: 120 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"license": "BSD-3-Clause",
2121
"dependencies": {
2222
"@apollographql/graphql-playground-html": "1.6.24",
23+
"@graphql-tools/stitch": "^6.0.0",
24+
"@graphql-tools/utils": "^6.0.0",
2325
"@parse/fs-files-adapter": "1.0.1",
2426
"@parse/push-adapter": "3.2.0",
2527
"@parse/s3-files-adapter": "1.4.0",
@@ -35,7 +37,6 @@
3537
"graphql": "15.0.0",
3638
"graphql-list-fields": "2.0.2",
3739
"graphql-relay": "^0.6.0",
38-
"graphql-tools": "^5.0.0",
3940
"graphql-upload": "11.0.0",
4041
"intersect": "1.0.1",
4142
"jsonwebtoken": "8.5.1",

spec/ParseGraphQLServer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10987,8 +10987,8 @@ describe('ParseGraphQLServer', () => {
1098710987
httpServer = http.createServer(expressApp);
1098810988
parseGraphQLServer = new ParseGraphQLServer(parseServer, {
1098910989
graphQLPath: '/graphql',
10990-
graphQLCustomTypeDefs: ({ autoSchema, mergeSchemas }) =>
10991-
mergeSchemas({ schemas: [autoSchema] }),
10990+
graphQLCustomTypeDefs: ({ autoSchema, stitchSchemas }) =>
10991+
stitchSchemas({ subschemas: [autoSchema] }),
1099210992
});
1099310993

1099410994
parseGraphQLServer.applyGraphQL(expressApp);

src/GraphQL/ParseGraphQLSchema.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {
55
DocumentNode,
66
GraphQLNamedType,
77
} from 'graphql';
8-
import { mergeSchemas, SchemaDirectiveVisitor } from 'graphql-tools';
8+
import { stitchSchemas } from '@graphql-tools/stitch';
9+
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
910
import requiredParameter from '../requiredParameter';
1011
import * as defaultGraphQLTypes from './loaders/defaultGraphQLTypes';
1112
import * as parseClassTypes from './loaders/parseClassTypes';
@@ -251,7 +252,7 @@ class ParseGraphQLSchema {
251252
}
252253
}
253254
);
254-
this.graphQLSchema = mergeSchemas({
255+
this.graphQLSchema = stitchSchemas({
255256
schemas: [
256257
this.graphQLSchemaDirectivesDefinitions,
257258
this.graphQLAutoSchema,
@@ -262,10 +263,10 @@ class ParseGraphQLSchema {
262263
this.graphQLSchema = await this.graphQLCustomTypeDefs({
263264
directivesDefinitionsSchema: this.graphQLSchemaDirectivesDefinitions,
264265
autoSchema: this.graphQLAutoSchema,
265-
mergeSchemas,
266+
stitchSchemas,
266267
});
267268
} else {
268-
this.graphQLSchema = mergeSchemas({
269+
this.graphQLSchema = stitchSchemas({
269270
schemas: [
270271
this.graphQLSchemaDirectivesDefinitions,
271272
this.graphQLAutoSchema,

src/GraphQL/loaders/schemaDirectives.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import gql from 'graphql-tag';
2-
import { SchemaDirectiveVisitor } from 'graphql-tools';
2+
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
33
import { FunctionsRouter } from '../../Routers/FunctionsRouter';
44

55
export const definitions = gql`

0 commit comments

Comments
 (0)