add codegen to graphql modules / yoga template
This commit is contained in:
24
web/other/graphql-modules-yoga-prisma-starter/codegen.ts
Normal file
24
web/other/graphql-modules-yoga-prisma-starter/codegen.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { CodegenConfig } from "@graphql-codegen/cli";
|
||||
|
||||
const config: CodegenConfig = {
|
||||
schema: "./src/modules/**/typedefs/*.graphql",
|
||||
generates: {
|
||||
"./src/modules/": {
|
||||
preset: "graphql-modules",
|
||||
presetConfig: {
|
||||
baseTypesPath: "../gql/graphql.ts",
|
||||
filename: "module-types.ts",
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
add: {
|
||||
content: "/* eslint-disable */",
|
||||
},
|
||||
},
|
||||
"typescript",
|
||||
"typescript-resolvers",
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
Reference in New Issue
Block a user