Download next.js/examples/cms-wordpress/codegen.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 525 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-wordpress/codegen.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-wordpress/codegen.ts
-
curl -L -o codegen.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/examples/cms-wordpress/codegen.ts
525 Bytes
| import type { CodegenConfig } from "@graphql-codegen/cli"; | |
| import { loadEnvConfig } from "@next/env"; | |
| const projectDir = process.cwd(); | |
| loadEnvConfig(projectDir); | |
| const config: CodegenConfig = { | |
| overwrite: true, | |
| schema: { | |
| [`${process.env.NEXT_PUBLIC_WORDPRESS_API_URL}/graphql`]: { | |
| headers: { | |
| "User-Agent": "Codegen", | |
| }, | |
| }, | |
| }, | |
| generates: { | |
| "src/gql/": { | |
| preset: "client", | |
| }, | |
| "src/gql/schema.gql": { | |
| plugins: ["schema-ast"], | |
| }, | |
| }, | |
| }; | |
| export default config; | |