diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-12 08:59:01 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-12 10:18:01 +0900 |
| commit | 9da56e3023af305ba7c5fd49caab60ac8bb57100 (patch) | |
| tree | ee6ada3798ffafac1742dbcdff2fbb6326640498 /frontend/graphql-codegen.ts | |
| parent | 1e6d528f54744a7fd76ba5cac4e63d8b5abd5fd6 (diff) | |
| download | feedaka-9da56e3023af305ba7c5fd49caab60ac8bb57100.tar.gz feedaka-9da56e3023af305ba7c5fd49caab60ac8bb57100.tar.zst feedaka-9da56e3023af305ba7c5fd49caab60ac8bb57100.zip | |
feat(frontend): setup GraphQL code generation
Diffstat (limited to 'frontend/graphql-codegen.ts')
| -rw-r--r-- | frontend/graphql-codegen.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/frontend/graphql-codegen.ts b/frontend/graphql-codegen.ts index ddba3b1..af62625 100644 --- a/frontend/graphql-codegen.ts +++ b/frontend/graphql-codegen.ts @@ -3,11 +3,19 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { overwrite: true, schema: "../common/graphql/schema.graphql", - documents: "src/**/*.tsx", + documents: ["src/**/*.tsx", "src/**/*.ts", "src/**/*.graphql"], generates: { - "src/graphql": { + "src/graphql/generated/": { preset: "client", plugins: [], + config: { + enumsAsTypes: true, + skipTypename: true, + useTypeImports: true, + scalars: { + DateTime: "string", + }, + }, }, }, }; |
