dotansimha / dotansimha/graphql-code-generator

Resolve input types with preResolveTypes same as selection sets

Open
#3,958 0 comments 1 reaction 0 assignees View on GitHub
core help wanted kind/enhancement plugins
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

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)
```ts
export type CreateReviewForEpisodeMutationVariables = {
/* ... */
review: ReviewInput;
};
```

should be
```ts
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;
}>;
}
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.