Skip to content

Output seems to no longer be compatible with @graphql-codegen/cli v7 / client-preset v6 #1522

Description

@pirate-max

I'm currently trying to update my codebase to @graphql-codegen/cli v7 and @graphql-codegen/client-preset v6 and found that the following output

export const PaymentStatusSchema: z.ZodType<PaymentStatus, PaymentStatus> = z.enum(PaymentStatus);

is no longer compatible. Codegen now emits enums as string union types instead of actual enums, which leads to the following error:

'PaymentStatus' only refers to a type, but is being used as a value here.

Just wanted to ask whether there is a workaround and if an update is being worked on?

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