Skip to content

Commit

Permalink
feat: upgrade to graphql 15 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
acao committed Jan 8, 2020
1 parent 3c5e329 commit ee6302e
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"eslint-plugin-react": "7.17.0",
"fetch-mock": "^6.0.0",
"flow-bin": "^0.101.0",
"graphql": "^14.5.2",
"graphql": "^15.0.0-rc.1",
"husky": "^3.0.5",
"jest": "^24.8.0",
"jest-environment-jsdom": "^24.8.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/codemirror-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"peerDependencies": {
"codemirror": "^5.26.0",
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"graphql-language-service-interface": "^2.3.3",
Expand All @@ -60,7 +60,7 @@
"chai-subset": "1.6.0",
"codemirror": "^5.28.0",
"cross-env": "^6.0.3",
"graphql": "^14.0.2",
"graphql": "^15.0.0-rc.1",
"jsdom": "^11.2.0",
"mocha": "7.0.0",
"nyc": "^15.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"theme-ui": "^0.2.52"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0",
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0",
"prop-types": ">=15.5.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
Expand All @@ -71,7 +71,7 @@
"cssnano": "^4.1.10",
"express": "4.17.1",
"express-graphql": "0.9.0",
"graphql": "14.5.8",
"graphql": "^15.0.0-rc.1",
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.8.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/graphiql/src/utility/introspectionQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/

import { getOperationAST, parse, introspectionQuery } from 'graphql';
import { getOperationAST, parse, getIntrospectionQuery } from 'graphql';

export { introspectionQuery } from 'graphql';
export const introspectionQueryName = getOperationAST(parse(introspectionQuery))
.name.value;
export const introspectionQueryName = getOperationAST(
parse(getIntrospectionQuery()),
).name.value;

// Some GraphQL services do not support subscriptions and fail an introspection
// query which includes the `subscriptionType` field as the stock introspection
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"graphql-config": "2.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ describe('GraphQLLanguageService', () => {
);
expect(diagnostics.length).toEqual(1);
const diagnostic = diagnostics[0];
expect(diagnostic.message).toEqual('Syntax Error: Unexpected Name "qeury"');
expect(diagnostic.message).toEqual(
'Syntax Error: Unexpected Name "qeury".',
);
});

it('runs definition service as expected', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('getDiagnostics', () => {
schema,
)[0];
expect(error.message).toEqual(
'The field Query.deprecatedField is deprecated. Use test instead.',
// eslint-disable-next-line no-useless-escape
'The field "Query.deprecatedField" is deprecated. Use test instead.',
);
expect(error.severity).toEqual(SEVERITY.WARNING);
expect(error.source).toEqual('GraphQL: Deprecation');
Expand Down Expand Up @@ -71,7 +72,10 @@ describe('getDiagnostics', () => {
);
expect(errors.length).toEqual(1);
const error = errors[0];
expect(error.message).toEqual('Syntax Error: Expected :, found Name "id"');
expect(error.message).toEqual(
// eslint-disable-next-line no-useless-escape
'Syntax Error: Expected ":", found Name "id".',
);
expect(error.severity).toEqual(SEVERITY.ERROR);
expect(error.source).toEqual('GraphQL: Syntax');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"graphql-config": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"@babel/parser": "^7.4.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"graphql-config": "2.2.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"graphql-config": "2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"build-flow": "node ../../resources/buildFlow.js"
},
"peerDependencies": {
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"@babel/polyfill": "7.7.0",
Expand Down
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8371,13 +8371,20 @@ graphql-request@^1.5.0:
dependencies:
cross-fetch "2.2.2"

graphql@14.5.8, graphql@^14.0.2, graphql@^14.5.2:
graphql@14.5.8:
version "14.5.8"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.8.tgz#504f3d3114cb9a0a3f359bbbcf38d9e5bf6a6b3c"
integrity sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg==
dependencies:
iterall "^1.2.2"

graphql@^15.0.0-rc.1:
version "15.0.0-rc.1"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0-rc.1.tgz#246c5c02ee60d2fe2f670bf97847da9ad95e7e0c"
integrity sha512-yuuP9Pjtl6Pf2js/P9WKEcCBql3fTlYqBOX8EdW9Di/Y3VyK56tdK4KLULDsgIni5gcqv8GgtY5j/DMho+RXYw==
dependencies:
iterall "^1.3.0"

growl@1.10.5:
version "1.10.5"
resolved "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
Expand Down Expand Up @@ -9783,6 +9790,11 @@ iterall@^1.2.2:
resolved "https://registry.npmjs.org/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7"
integrity sha512-yynBb1g+RFUPY64fTrFv7nsjRrENBQJaX2UL+2Szc9REFrSNm1rpSXHGzhmAy7a9uv3vlvgBlXnf9RqmPH1/DA==

iterall@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==

iterate-value@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.1.tgz#d2003239b4a06c91a3f8092e379f6062b03c268c"
Expand Down

0 comments on commit ee6302e

Please sign in to comment.