@khanacademy/graphql-flow 3.2.0 → 3.3.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.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b9fc899: Adds support for marking input fields as @deprecated
8
+
3
9
  ## 3.2.0
4
10
 
5
11
  ### Minor Changes
@@ -68,7 +68,8 @@ const getSchemas = schemaFilePath => {
68
68
  const queryResponse = (0, _graphql.graphqlSync)({
69
69
  schema: schemaForValidation,
70
70
  source: (0, _graphql.getIntrospectionQuery)({
71
- descriptions: true
71
+ descriptions: true,
72
+ inputValueDeprecation: true
72
73
  })
73
74
  });
74
75
  const schemaForTypeGeneration = (0, _schemaFromIntrospectionData.schemaFromIntrospectionData)(queryResponse.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/graphql-flow",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "bin": {
5
5
  "graphql-flow": "./dist/cli/run.js"
6
6
  },
@@ -61,6 +61,7 @@ input CharacterInput {
61
61
  appearsIn: [Episode!]
62
62
  candies: PositiveNumber!
63
63
  friendly: Boolean! = true
64
+ toBeRemoved: String @deprecated(reason: "Unused")
64
65
  }
65
66
 
66
67
  type Mutation {
@@ -579,6 +579,7 @@ describe("graphql-flow generation", () => {
579
579
  "NEW_HOPE" | "EMPIRE" | "JEDI"> | null | undefined;
580
580
  candies: number;
581
581
  friendly?: boolean | null | undefined;
582
+ toBeRemoved?: string | null | undefined;
582
583
  };
583
584
  },
584
585
  response: {
@@ -610,6 +611,7 @@ describe("graphql-flow generation", () => {
610
611
  appearsIn?: ReadonlyArray<"NEW_HOPE" | "EMPIRE" | "JEDI"> | null | undefined;
611
612
  candies: number;
612
613
  friendly?: boolean | null | undefined;
614
+ toBeRemoved?: string | null | undefined;
613
615
  };
614
616
  },
615
617
  response: {
package/src/cli/config.ts CHANGED
@@ -91,7 +91,10 @@ export const getSchemas = (schemaFilePath: string): [GraphQLSchema, Schema] => {
91
91
  const schemaForValidation = buildSchema(raw);
92
92
  const queryResponse = graphqlSync({
93
93
  schema: schemaForValidation,
94
- source: getIntrospectionQuery({descriptions: true}),
94
+ source: getIntrospectionQuery({
95
+ descriptions: true,
96
+ inputValueDeprecation: true,
97
+ }),
95
98
  });
96
99
  const schemaForTypeGeneration = schemaFromIntrospectionData(
97
100
  queryResponse.data as any as IntrospectionQuery,