dotansimha/graphql-code-generator

[experimental-graphql-modules] no config in generation for enums

オープン

#5,242 opened on 2020/12/11

 (4 件のコメント) (1 件のリアクション) (0 人の担当者)TypeScript (1,295 件のフォーク)batch import
corehelp wantedkind/enhancementpresets

Repository metrics

Stars
 (10,341 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Im using the new experimental graphql-module creation. In the old schema creation we had this config:

        config:
            constEnums: true
            avoidOptionals: true
            namingConvention:
                enumValues: change-case#upperCase

Now the new graphql-modules option creates the complete schema but i cant set any config. So i lost all my enums basically (which follow TS spec, also saw it with DTS generator). I can create the other as well, but why having two schemas :)

example new situation:

/** Order your items */
export type BasketListOrdering = 
  /** By department, which is based on product taxonomy */
  | 'DEPARTMENT'
  /** By latest item added first */
  | 'INPUT';

example old situation:

/** Order your items */
export const enum BasketListOrdering {
    /** By department, which is based on product taxonomy */
    DEPARTMENT = 'DEPARTMENT',
    /** By latest item added first */
    INPUT = 'INPUT',
}

btw really cool to see the progress on the suite!

コントリビューターガイド