graphql-data-generator 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/esm/codegen.js +4 -4
  2. package/package.json +1 -1
package/esm/codegen.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { readFile } from "node:fs/promises";
2
- import { Kind, OperationTypeNode, parse, printSchema } from "graphql";
2
+ import { Kind, parse, printSchema } from "graphql";
3
3
  import fg from "fast-glob";
4
4
  import { join, relative } from "node:path";
5
5
  import { raise } from "./util.js";
@@ -309,13 +309,13 @@ export const codegen = (schema, files, { enums = "literals", scalars, includeTyp
309
309
  {
310
310
  for (const operationType of definition.operationTypes) {
311
311
  switch (operationType.operation) {
312
- case OperationTypeNode.QUERY:
312
+ case "query":
313
313
  queryKey = operationType.type.name.value;
314
314
  break;
315
- case OperationTypeNode.MUTATION:
315
+ case "mutation":
316
316
  mutationKey = operationType.type.name.value;
317
317
  break;
318
- case OperationTypeNode.SUBSCRIPTION:
318
+ case "subscription":
319
319
  subscriptionKey = operationType.type.name.value;
320
320
  break;
321
321
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-data-generator",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/vocesgraphql-data-generator/.git"