Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

enum on directive with enumPrefix to false still adds prefix

Đang mở
#10,285 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@eddeee888 đang làm issue này rồi.

Từ ngày 29/9/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Which packages are impacted by your issue?
typescript
Describe the bug

Enums on directives: These are generated doesn’t take the enumPrefix configuration into account.

Your Example Website or App
Steps to Reproduce the Bug or Issue

Here is the example

directive @cacheControl(maxAge: Int, scope: CacheControlScope) on FIELD_DEFINITION | OBJECT | INTERFACE
enum CacheControlScope {
    PUBLIC
    PRIVATE
}
generated code
export enum CacheControlScope {
  Private = 'PRIVATE',
  Public = 'PUBLIC'
}
export type ICacheControlDirectiveArgs = {
  maxAge?: Maybe<Scalars['Int']['input']>;
  scope?: Maybe<ICacheControlScope>;
};
Expected behavior

expected below

export type ICacheControlDirectiveArgs = {
  maxAge?: Maybe<Scalars['Int']['input']>;
  scope?: Maybe<CacheControlScope>;
};
Screenshots or Videos

No response

Platform
  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • graphql version: [e.g. 16.3.0]
        "@graphql-codegen/add": "^5.0.3",
        "@graphql-codegen/cli": "^5.0.4",
        "@graphql-codegen/fragment-matcher": "^5.1.0",
        "@graphql-codegen/typescript": "^4.1.3",
        "@graphql-codegen/typescript-operations": "^4.4.1",
        "@graphql-codegen/typescript-resolvers": "^4.4.2"
Codegen Config File

No response

Additional context

No response

Ngôn ngữ chính
TypeScript
Star
11.3k
Fork
1.4k
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
54

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotansimha/graphql-code-generator

Tất cả issue của dotansimha/graphql-code-generator

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.