Skip to content

Plugin refuses to use zod #1119

Description

@shellscape

Using the latest version of @graphql-codegen/cli and codegen.ts (as is now recommended by the docs rather than YAML) I cannot get this plugin to use zod. The plugin appears to ignore all configuration. Here's my config, it's nothing special:

import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
  schema: '/tmp/schema.graphql',
  documents: ['app/**/*.tsx', 'app/**/*.ts'],
  ignoreNoDocuments: true,
  generates: {
    './app/gql/': {
      plugins: ['typescript-validation-schema'],
      config: { schema: 'zod' },
      preset: 'client'
    }
  }
};

export default config;

The plugin continues to generate code using yup and will not use zod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions