Skip to content

Commit ad68019

Browse files
Update 'graphql' to 16.3.x so that we can update 'vite' in webapp (#64)
## Summary: We'd like to update 'vite' in webapp to 4.x, but the new version has issues with the graphql 14.x. Updating graphql to 16.x fixes it, but it means we need to update graphql-flow to use the same version of graphql. I bumped the version by a whole version since this change will break consumers unless they upgrade `graphql`. Issue: None ## Test plan: - yarn test Author: kevinbarabash Reviewers: kevinbarabash, jeresig, jaredly Required Reviewers: Approved By: jeresig Checks: ✅ Lint & Test (ubuntu-latest, 16.x), ✅ Lint & Test (ubuntu-latest, 16.x) Pull Request URL: #64
1 parent 57a6bac commit ad68019

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.changeset/violet-avocados-suffer.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@khanacademy/graphql-flow': major
3+
---
4+
5+
Update 'graphql' to 16.3.x (requires consumers to change their version of 'graphql')

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@babel/types": "^7.17.0",
4141
"@khanacademy/wonder-stuff-core": "^1.5.1",
4242
"apollo-utilities": "^1.3.4",
43-
"graphql": "14.5.8",
43+
"graphql": "^16.3.0",
4444
"jsonschema": "^1.4.1",
4545
"prettier": "^2.5.1",
4646
"prettier-eslint": "^13.0.0"

src/cli/config.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ export const getSchemas = (schemaFilePath: string): [GraphQLSchema, Schema] => {
3939
const raw = fs.readFileSync(schemaFilePath, 'utf8');
4040
if (schemaFilePath.endsWith('.graphql')) {
4141
const schemaForValidation = buildSchema(raw);
42-
const queryResponse = graphqlSync(
43-
schemaForValidation,
44-
getIntrospectionQuery({descriptions: true}),
45-
);
42+
const queryResponse = graphqlSync({
43+
schema: schemaForValidation,
44+
source: getIntrospectionQuery({descriptions: true}),
45+
});
4646
const schemaForTypeGeneration = schemaFromIntrospectionData(
4747
// eslint-disable-next-line flowtype-errors/uncovered
48-
(queryResponse.data as IntrospectionQuery),
48+
((queryResponse.data as any) as IntrospectionQuery),
4949
);
5050
return [schemaForValidation, schemaForTypeGeneration];
5151
} else {

yarn.lock

+4-11
Original file line numberDiff line numberDiff line change
@@ -3609,12 +3609,10 @@ [email protected]:
36093609
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
36103610
integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
36113611

3612-
3613-
version "14.5.8"
3614-
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.5.8.tgz#504f3d3114cb9a0a3f359bbbcf38d9e5bf6a6b3c"
3615-
integrity sha512-MMwmi0zlVLQKLdGiMfWkgQD7dY/TUKt4L+zgJ/aR0Howebod3aNgP5JkgvAULiR2HPVZaP2VEElqtdidHweLkg==
3616-
dependencies:
3617-
iterall "^1.2.2"
3612+
graphql@^16.3.0:
3613+
version "16.8.0"
3614+
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.0.tgz#374478b7f27b2dc6153c8f42c1b80157f79d79d4"
3615+
integrity sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==
36183616

36193617
hard-rejection@^2.1.0:
36203618
version "2.1.0"
@@ -4079,11 +4077,6 @@ istanbul-reports@^3.1.3:
40794077
html-escaper "^2.0.0"
40804078
istanbul-lib-report "^3.0.0"
40814079

4082-
iterall@^1.2.2:
4083-
version "1.3.0"
4084-
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
4085-
integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==
4086-
40874080
jest-changed-files@^27.5.1:
40884081
version "27.5.1"
40894082
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5"

0 commit comments

Comments
 (0)