From cada99d106273ee17e2eb42130f56c935011aa7b Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 7 Apr 2020 16:13:44 +0200 Subject: [PATCH 1/5] Support GraphQL v15 --- package.json | 4 ++-- src/test/testingSchemas.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3ec61534073..a2f12b23d0b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "uuid": "^3.1.0" }, "peerDependencies": { - "graphql": "^0.13.0 || ^14.0.0" + "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { "@types/chai": "4.0.10", @@ -69,7 +69,7 @@ "chai": "^4.1.2", "dateformat": "^3.0.3", "express": "^4.16.2", - "graphql": "^14.5.8", + "graphql": "^15.0.0", "graphql-subscriptions": "^1.0.0", "graphql-type-json": "^0.1.4", "istanbul": "^0.4.5", diff --git a/src/test/testingSchemas.ts b/src/test/testingSchemas.ts index 5e428cb6784..66266bbdf3a 100644 --- a/src/test/testingSchemas.ts +++ b/src/test/testingSchemas.ts @@ -9,7 +9,6 @@ import { ExecutionResult, DocumentNode, } from 'graphql'; -import { ExecutionResultDataDefault } from 'graphql/execution/execute'; import { ApolloLink, Observable, @@ -23,6 +22,10 @@ import makeRemoteExecutableSchema, { import introspectSchema from '../stitching/introspectSchema'; import { PubSub } from 'graphql-subscriptions'; +type ExecutionResultDataDefault = { + [key: string]: any; +} + export type Location = { name: string; coordinates: string; From 69e22a68a35b49741a6b8eebfe492258e91d83bb Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 10 Apr 2020 12:46:38 +0300 Subject: [PATCH 2/5] Bump the minimum acceptable range for `apollo-link`. Now that https://github.com/apollographql/apollo-link/pull/1263 is merged, we can run the tests again and see if they pass. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2f12b23d0b..6d4ed6f984a 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "homepage": "https://github.com/apollostack/graphql-tools#readme", "dependencies": { - "apollo-link": "^1.2.3", + "apollo-link": "^1.2.14", "apollo-utilities": "^1.0.1", "deprecated-decorator": "^0.1.6", "iterall": "^1.1.3", From cea83832d70a1c5bd82091257722ee1cd30c0901 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Fri, 10 Apr 2020 13:22:40 +0300 Subject: [PATCH 3/5] v15: Unspecified descriptions are now `null` in the AST. Ref: https://github.com/graphql/graphql-js/pull/2177 --- src/test/testSchemaGenerator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/testSchemaGenerator.ts b/src/test/testSchemaGenerator.ts index f77ac22e374..2cacf83c776 100644 --- a/src/test/testSchemaGenerator.ts +++ b/src/test/testSchemaGenerator.ts @@ -243,7 +243,7 @@ describe('generating schema from shorthand', () => { }, query: { name: 'RootQuery', - description: '', + description: null, fields: [ { name: 'species', From 54a8b26a873cd62f33828de88c2009de5bb40d68 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 14 Apr 2020 10:47:21 +0200 Subject: [PATCH 4/5] Order in GraphQL v15 is different --- .gitignore | 1 + src/test/testSchemaGenerator.ts | 2 +- src/test/testingSchemas.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7ac4c259186..08d9f0acf05 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dist *.tgz .DS_Store package-lock.json +yarn.lock diff --git a/src/test/testSchemaGenerator.ts b/src/test/testSchemaGenerator.ts index 2cacf83c776..2bee74a1957 100644 --- a/src/test/testSchemaGenerator.ts +++ b/src/test/testSchemaGenerator.ts @@ -1605,7 +1605,7 @@ describe('generating schema from shorthand', () => { }, errorMatcher); } - assertFieldError('Bird.id', {}); + assertFieldError('Query.bird', {}); assertFieldError('Query.bird', { Bird: { id: (bird: { id: string }) => bird.id, diff --git a/src/test/testingSchemas.ts b/src/test/testingSchemas.ts index 66266bbdf3a..15df490e3d3 100644 --- a/src/test/testingSchemas.ts +++ b/src/test/testingSchemas.ts @@ -24,7 +24,7 @@ import { PubSub } from 'graphql-subscriptions'; type ExecutionResultDataDefault = { [key: string]: any; -} +}; export type Location = { name: string; From 4dbca17e021021c698f6577b229309ab7e3d6cd8 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Tue, 14 Apr 2020 10:50:51 +0200 Subject: [PATCH 5/5] Test Node 10 and 12 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 62262c34e04..d2e695a6700 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - - "8" - "10" + - "12" install: - npm config set spin=false