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

preResolveTypes lose Maybe<> typing #2175

Closed
ghost opened this issue Jul 15, 2019 · 3 comments
Closed

preResolveTypes lose Maybe<> typing #2175

ghost opened this issue Jul 15, 2019 · 3 comments
Labels
plugins waiting-for-release Fixed/resolved, and waiting for the next stable release

Comments

@ghost
Copy link

ghost commented Jul 15, 2019

Huge thanks for implementing preResolveTypes, it's beautiful!

It seems to be dropping all supplemental type info (maybe, array, ...anything else?) on primitive types though (strings, numbers, etc). This data is being retained on the wrappers around nested object types:

export type someFragment = {
  key: string;        # should be `Maybe<string>`
  anotherKey: string; # should be string[]
  finalKey: Maybe<Array<{ key: string }>>;
}

Related to #2159

Environment:

  • OS: OSX 10.14.5
  • @graphql-codegen/...: ^0.14.0
  • NodeJS: 10.16.0
dotansimha added a commit that referenced this issue Aug 1, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
daviddias David Dias
@dotansimha
Copy link
Owner

@markkahn I think I fixed it, can you please try? 1.4.1-alpha-1998a660.66

@dotansimha dotansimha added the waiting-for-release Fixed/resolved, and waiting for the next stable release label Aug 1, 2019
@ghost
Copy link
Author

ghost commented Aug 1, 2019

LGTM! from 742 ts errors -> 0

@dotansimha
Copy link
Owner

Fixed in 1.5.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins waiting-for-release Fixed/resolved, and waiting for the next stable release
Projects
None yet
Development

No branches or pull requests

1 participant