@khanacademy/graphql-flow 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @khanacademy/graphql-flow
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - ad68019: Update 'graphql' to 16.3.x (requires consumers to change their version of 'graphql')
8
+
3
9
  ## 2.0.0
4
10
 
5
11
  ### Major Changes
@@ -52,9 +52,12 @@ const getSchemas = schemaFilePath => {
52
52
 
53
53
  if (schemaFilePath.endsWith('.graphql')) {
54
54
  const schemaForValidation = (0, _graphql.buildSchema)(raw);
55
- const queryResponse = (0, _graphql.graphqlSync)(schemaForValidation, (0, _graphql.getIntrospectionQuery)({
56
- descriptions: true
57
- }));
55
+ const queryResponse = (0, _graphql.graphqlSync)({
56
+ schema: schemaForValidation,
57
+ source: (0, _graphql.getIntrospectionQuery)({
58
+ descriptions: true
59
+ })
60
+ });
58
61
  const schemaForTypeGeneration = (0, _schemaFromIntrospectionData.schemaFromIntrospectionData)( // eslint-disable-next-line flowtype-errors/uncovered
59
62
  queryResponse.data);
60
63
  return [schemaForValidation, schemaForTypeGeneration];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/graphql-flow",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "bin": {
5
5
  "graphql-flow": "./dist/cli/run.js"
6
6
  },
@@ -40,7 +40,7 @@
40
40
  "@babel/types": "^7.17.0",
41
41
  "@khanacademy/wonder-stuff-core": "^1.5.1",
42
42
  "apollo-utilities": "^1.3.4",
43
- "graphql": "14.5.8",
43
+ "graphql": "^16.3.0",
44
44
  "jsonschema": "^1.4.1",
45
45
  "prettier": "^2.5.1",
46
46
  "prettier-eslint": "^13.0.0"
package/src/cli/config.ts CHANGED
@@ -39,13 +39,13 @@ export const getSchemas = (schemaFilePath: string): [GraphQLSchema, Schema] => {
39
39
  const raw = fs.readFileSync(schemaFilePath, 'utf8');
40
40
  if (schemaFilePath.endsWith('.graphql')) {
41
41
  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
+ });
46
46
  const schemaForTypeGeneration = schemaFromIntrospectionData(
47
47
  // eslint-disable-next-line flowtype-errors/uncovered
48
- (queryResponse.data as IntrospectionQuery),
48
+ ((queryResponse.data as any) as IntrospectionQuery),
49
49
  );
50
50
  return [schemaForValidation, schemaForTypeGeneration];
51
51
  } else {