dotansimha/graphql-code-generator
Vedi su GitHubResolve input types with preResolveTypes same as selection sets
Open
#3958 aperta il 30 apr 2020
corehelp wantedkind/enhancementplugins
Metriche repository
- Star
- (10.341 star)
- Metriche merge PR
- (Merge medio 46g 1h) (11 PR mergiate in 30 g)
Descrizione
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;
}>;
}
};