graphql-client-demo/codegen.ts
imbytecat e10a458dbe chore: 更新VSCode配置和重构生成文件结构
- 添加推荐的VSCode扩展配置。
- 修改生成文件路径,将GraphQL生成目录从'./graphql/__generated__/'更改为'./generated/graphql/'。
- 重命名文件 fragment-masking.ts。
- 重命名生成的GraphQL文档文件并移除不必要的查询定义。
- 重命名文件并移除无用的查询类型定义。
- 重命名生成的GraphQL索引文件。
- 修正导入路径以反映新的 GraphQL 生成文件位置。
2025-02-18 13:34:06 +08:00

20 lines
566 B
TypeScript

import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: "http://172.16.6.246:8055/graphql?access_token=WkVWFMiFcrjsXRZqsL30Cd4Sboe0DRk-",
// this assumes that all your source files are in a top-level `src/` directory - you might need to adjust this to your file structure
documents: ['src/**/*.{ts,tsx}'],
generates: {
'./generated/graphql/': {
preset: 'client',
plugins: [],
presetConfig: {
gqlTagName: 'gql',
}
}
},
ignoreNoDocuments: true,
};
export default config;