@graphitation/ts-codegen v5.1.2
@graphitation/ts-codegen
This package generates Typescript definitions based on GraphQL Schema Definition Language.
Parameters
document
(DocumentNode): The GraphQL document consisting the schema definitions to generate TypeScript code from.options
(GenerateTSOptions): An object containing various options for the code generation.
Options
Below is the list of all flags that can be passed to the code generator (see codegen.ts).
export interface GenerateTSOptions {
outputPath: string;
documentPath: string;
contextTypePath?: string | null;
contextTypeName?: string;
enumsImport?: string | null;
legacyCompat?: boolean;
useStringUnionsInsteadOfEnums?: boolean;
legacyNoModelsForObjects?: boolean;
modelScope?: string | null;
generateOnlyEnums?: boolean;
enumNamesToMigrate?: string[];
enumNamesToKeep?: string[];
contextSubTypeNameTemplate?: string;
contextSubTypePathTemplate?: string;
defaultContextSubTypePath?: string;
defaultContextSubTypeName?: string;
/**
* Enable the generation of the resolver map as the default export in the resolvers file.
*
* @see createResolversMap in packages/ts-codegen/src/resolvers.ts
*
* @example
* export default interface ResolversMap {
* readonly User?: User.Resolvers;
* readonly Post?: Post.Resolvers;
* readonly Query?: Query.Resolvers;
* }
* */
generateResolverMap?: boolean;
}
4 months ago
4 months ago
4 months ago
6 months ago
8 months ago
8 months ago
8 months ago
11 months ago
6 months ago
4 months ago
11 months ago
6 months ago
11 months ago
11 months ago
11 months ago
8 months ago
7 months ago
7 months ago
6 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago