Build Nuxt 4 client cabinet with Apollo and GraphQL flows
This commit is contained in:
18
codegen.ts
Normal file
18
codegen.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { CodegenConfig } from '@graphql-codegen/cli';
|
||||
|
||||
const config: CodegenConfig = {
|
||||
schema: './graphql/schema.graphql',
|
||||
documents: ['./graphql/operations/**/*.graphql'],
|
||||
generates: {
|
||||
'./app/composables/graphql/generated.ts': {
|
||||
plugins: ['typescript', 'typescript-operations', 'typescript-vue-apollo'],
|
||||
config: {
|
||||
withCompositionFunctions: true,
|
||||
vueApolloComposableImportFrom: '@vue/apollo-composable',
|
||||
useTypeImports: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user