18 lines
414 B
TypeScript
18 lines
414 B
TypeScript
import { CodegenConfig } from "@graphql-codegen/cli";
|
|
|
|
import { loadEnvConfig } from "@next/env";
|
|
loadEnvConfig(process.cwd());
|
|
|
|
const config: CodegenConfig = {
|
|
schema: process.env.GRAPHQL_ENDPOINT,
|
|
documents: ["src/**/*.tsx", "src/**/*.ts"],
|
|
ignoreNoDocuments: true, // for better experience with the watcher
|
|
generates: {
|
|
"./src/gql/": {
|
|
preset: "client",
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|