text: module.exports = {
    schema: "src/autogenerated/schema.graphql",
    documents: [
      // can be switched to "src/graphql/**/*.graphql" glob
      "src/graphql/operations/*.graphql",
      "src/graphql/fragments/*.graphql",
    ],
    hooks: {
      afterAllFileWrite: ["prettier --write"],
    },
    generates: {
      "src/autogenerated/types.ts": {
        plugins: ["typescript"],
      },
      "src/": {
        preset: "near-operation-file",
        presetConfig: {
          folder: "../../autogenerated/documents",
          baseTypesPath: "autogenerated/types.ts",
          extension: ".ts",
        },
        plugins: ["typescript-operations", "typed-document-node"],
        config: {
          documentMode: "documentNode",
          immutableTypes: false,
          enumsAsConst: true,
          namingConvention: {
            enumValues: "upper-case#upperCase",
          },
        },
      },
    },
  };
  