Skip to content

Commit

Permalink
Update 'graphql' to 16.3.x so that we can update 'vite' in webapp (#64)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
kevinbarabash authored Aug 28, 2023
1 parent 57a6bac commit ad68019
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-avocados-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@khanacademy/graphql-flow': major
---

Update 'graphql' to 16.3.x (requires consumers to change their version of 'graphql')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@babel/types": "^7.17.0",
"@khanacademy/wonder-stuff-core": "^1.5.1",
"apollo-utilities": "^1.3.4",
"graphql": "14.5.8",
"graphql": "^16.3.0",
"jsonschema": "^1.4.1",
"prettier": "^2.5.1",
"prettier-eslint": "^13.0.0"
Expand Down
10 changes: 5 additions & 5 deletions src/cli/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export const getSchemas = (schemaFilePath: string): [GraphQLSchema, Schema] => {
const raw = fs.readFileSync(schemaFilePath, 'utf8');
if (schemaFilePath.endsWith('.graphql')) {
const schemaForValidation = buildSchema(raw);
const queryResponse = graphqlSync(
schemaForValidation,
getIntrospectionQuery({descriptions: true}),
);
const queryResponse = graphqlSync({
schema: schemaForValidation,
source: getIntrospectionQuery({descriptions: true}),
});
const schemaForTypeGeneration = schemaFromIntrospectionData(
// eslint-disable-next-line flowtype-errors/uncovered
(queryResponse.data as IntrospectionQuery),
((queryResponse.data as any) as IntrospectionQuery),
);
return [schemaForValidation, schemaForTypeGeneration];
} else {
Expand Down
15 changes: 4 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3609,12 +3609,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==

[email protected]:
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@^16.3.0:
version "16.8.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.0.tgz#374478b7f27b2dc6153c8f42c1b80157f79d79d4"
integrity sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==

hard-rejection@^2.1.0:
version "2.1.0"
Expand Down Expand Up @@ -4079,11 +4077,6 @@ istanbul-reports@^3.1.3:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"

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

jest-changed-files@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5"
Expand Down

0 comments on commit ad68019

Please sign in to comment.