Created
July 15, 2024 16:46
-
-
Save maxsei/27d6cdb4e6f6024f1aad98ac70028918 to your computer and use it in GitHub Desktop.
codgen configuration for https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-generic-sdk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { CodegenConfig } from "@graphql-codegen/cli"; | |
const config: CodegenConfig = { | |
overwrite: true, | |
schema: "./graph/*.graphql", | |
documents: ["./app/graph/*.gql"], | |
generates: { | |
"./app/graph/types.ts": { | |
config: { | |
useTypeImports: true, | |
immutableTypes: true, | |
enumsAsTypes: true, | |
strictScalars: true, | |
scalars: { | |
Time: { | |
input: "Date", | |
output: "Date", | |
}, | |
}, | |
}, | |
plugins: [ | |
"typescript", | |
"typescript-operations", | |
"typescript-generic-sdk", | |
], | |
}, | |
}, | |
}; | |
export default config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment