Closed
Description
Hi, it seems like when using the client-preset the configuration is totally ignored.
import { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
sort: false,
schema: "file.graphql",
documents: [
"src/**/*.gql"
],
ignoreNoDocuments: true,
generates: {
'./src/graphql/': {
preset: 'client',
plugins: [
"typescript-validation-schema",
],
config: {
importFrom: './graphql',
strictScalars: true,
schema: 'zod',
}
}
}
}
export default config
this code would result in the validation schema using yup (default configuration) instead of zod
I need an extra generation to get it to use the right configuration
import { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
sort: false,
schema: "file.graphql",
documents: [
"src/**/*.gql"
],
ignoreNoDocuments: true,
generates: {
'./src/graphql/validation.ts': {
plugins: [
"typescript-validation-schema",
],
config: {
importFrom: './graphql',
strictScalars: true,
schema: 'zod',
}
},
'./src/graphql/': {
preset: 'client',
plugins: [],
config: {
}
}
}
}
export default config