Skip to content

Instantly share code, notes, and snippets.

@maxsei
Created July 15, 2024 16:46
Show Gist options
  • Save maxsei/27d6cdb4e6f6024f1aad98ac70028918 to your computer and use it in GitHub Desktop.
Save maxsei/27d6cdb4e6f6024f1aad98ac70028918 to your computer and use it in GitHub Desktop.
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