dotansimha/graphql-code-generator

Resolve input types with preResolveTypes same as selection sets

Open

#3,958 建立於 2020年4月30日

在 GitHub 查看
 (0 留言) (1 反應) (0 負責人)TypeScript (1,295 fork)batch import
corehelp wantedkind/enhancementplugins

倉庫指標

Star
 (10,341 star)
PR 合併指標
 (平均合併 46天 1小時) (30 天內合併 11 個 PR)

描述

Option preResolveTypes should work with input types in the same way as with output types

For example (https://github.com/dotansimha/graphql-code-generator/blob/master/dev-test/star-wars/types.preResolveTypes.ts#L237)

export type CreateReviewForEpisodeMutationVariables = {
   /* ... */
  review: ReviewInput;
};

should be

export type CreateReviewForEpisodeMutationVariables = {
  /* ... */
  review: {
    /** 0-5 stars */
    stars: number;
    /** Comment about the movie, optional */
    commentary?: string;
    /** Favorite color, optional */
    favoriteColor?: Maybe<{
      red: number;
      green: number;
      blue: number;
    }>;
  }
};

貢獻者指南