/** * This file is generated by src/gratsConfigBeta.ts. Do not edit directly. * Run `pnpm run test` to regenerate. */ /** * Describes the shape of the Grats config after parsing, validation, and * defaults. */ export type GratsConfig = { /** * Where Grats should write your schema file. Path is relative to the * `tsconfig.json` file. */ graphqlSchema: string; /** * Where Grats should write your executable TypeScript schema file. Path * is relative to the `tsconfig.json` file. */ tsSchema: string; /** * Where Grats should write your TypeScript enums file. Path is relative * to the `tsconfig.json` file. * If enabled, Grats will require that all GraphQL enums be defined using * exported TypeScript enums. Set to `null` to disable emitting this file. */ tsClientEnums: string | null; /** * Should all fields be typed as nullable in accordance with GraphQL best * practices? * https://graphql.org/learn/best-practices/#nullability * Individual fields can declare themselves as non-nullable by adding the * docblock tag `@killsParentOnException`. */ nullableByDefault: boolean; /** * Experimental feature to add `@semanticNonNull` to all fields which have * non-null TypeScript return types, but which are made nullable by the * `nullableByDefault` option. * This feature allows clients which handle errors out of band, for * example by discarding responses with errors, to know which fields are * expected to be non-null in the absence of errors. * See https://grats.capt.dev/docs/guides/strict-semantic-nullability * It is an error to enable `strictSemanticNullability` if * `nullableByDefault` is false. */ strictSemanticNullability: boolean; /** * Should Grats error if it encounters a TypeScript type error? * Note that Grats will always error if it encounters a TypeScript syntax * error. */ reportTypeScriptTypeErrors: boolean; /** * A string to prepend to the generated schema text. Useful for copyright * headers or other information to the generated file. Set to `null` to * omit the default header. */ schemaHeader: string | null; /** * A string to prepend to the generated TypeScript schema file. Useful for * copyright headers or other information to the generated file. Set to * `null` to omit the default header. */ tsSchemaHeader: string | null; /** * A string to prepend to the TypeScript enums file generated when the * `tsClientEnums` configuration options is set. Useful for copyright * headers or instructions for how to regenerate the file. Set to `null` * to omit the default header. */ tsClientEnumsHeader: string | null; /** * This option allows you configure an extension that will be appended to * the end of all import paths in the generated TypeScript schema file. * When building a package that uses ES modules, import paths must not * omit the file extension. In TypeScript code this generally means import * paths must end with `.js`. If set to null, no ending will be appended. */ importModuleSpecifierEnding: string; /** * EXPERIMENTAL: THIS OPTION WILL BE RENAMED OR REMOVED IN A FUTURE * RELEASE * Emit a JSON file alongside the generated schema file which contains the * metadata containing information about the resolvers. */ EXPERIMENTAL__emitMetadata: boolean; /** * EXPERIMENTAL: THIS OPTION WILL BE RENAMED OR REMOVED IN A FUTURE * RELEASE * Instead of emitting a TypeScript file which creates a GraphQLSchema, * emit a TypeScript file which creates a GraphQL Tools style Resolver * Map. * https://the-guild.dev/graphql/tools/docs/resolvers#resolver-map */ EXPERIMENTAL__emitResolverMap: boolean; };