mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-30 16:01:08 +00:00
Bumps the codegen stack: cli 6→7, client-preset 5→6, typescript 5→6, typescript-operations 5→6 (typescript-react-apollo and near-operation-file-preset only moved within their minor range). Configures typescript-react-apollo to emit Apollo v4-compatible imports via apolloReactCommonImportFrom / apolloReactHooksImportFrom set to @apollo/client/react, so re-running pnpm run graphql:generate now produces ApolloReactCommon / ApolloReactHooks namespaces from the v4 subpath instead of the v3 single-entry import. src/graphql/types.ts is fully regenerated under the new config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
906 B
TypeScript
28 lines
906 B
TypeScript
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
|
|
const config: CodegenConfig = {
|
|
documents: './graphql-schema.graphql',
|
|
generates: {
|
|
'./src/graphql/types.ts': {
|
|
config: {
|
|
dedupeFragments: true,
|
|
exportFragmentSpreadSubTypes: true,
|
|
apolloReactCommonImportFrom: '@apollo/client/react',
|
|
apolloReactHooksImportFrom: '@apollo/client/react',
|
|
inlineFragmentTypes: 'combine',
|
|
preResolveTypes: true,
|
|
skipTypename: true,
|
|
useTypeImports: true,
|
|
withHooks: true,
|
|
},
|
|
plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'],
|
|
},
|
|
},
|
|
hooks: {
|
|
afterOneFileWrite: ['npx prettier --write'],
|
|
},
|
|
schema: '../backend/pkg/graph/schema.graphqls',
|
|
};
|
|
|
|
export default config;
|