Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve input types with preResolveTypes same as selection sets #3958

Open
Tracked by #8296 ...
standy opened this issue Apr 30, 2020 · 0 comments
Open
Tracked by #8296 ...

Resolve input types with preResolveTypes same as selection sets #3958

standy opened this issue Apr 30, 2020 · 0 comments
Labels
core Related to codegen core/cli help wanted Extra attention is needed kind/enhancement New feature or request plugins

Comments

@standy
Copy link
Contributor

standy commented Apr 30, 2020

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;
    }>;
  }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to codegen core/cli help wanted Extra attention is needed kind/enhancement New feature or request plugins
Projects
None yet
Development

No branches or pull requests

3 participants