dangcuuson / graphql-schema-typescript

Generate TypeScript from GraphQL's schema type definitions
191 stars 36 forks source link

Fix parse issues with schemas for new graphql features #50

Closed rhdeck closed 4 years ago

rhdeck commented 4 years ago

The tools breaks when working with new versions of graphql. For example, a documented (using quotation marks) schema breaks on illegal character warning. Further, the new graphql libraries change their API, so just adjusting the dependency loaded doesn't work.

This PR updates the identified graphql dependencies and fixes the API import shape mismatches. Along the way, it is updated to Typescript 3.9, so types are tightened in the TS file too.

Basically, now it works for new graphql schemas!

tmikoss commented 4 years ago

Could you please list the cahanges that were necessary? It's kinda hard to parse out with all the code re-formatting :(

rhdeck commented 4 years ago

That's why I closed the pr! Will resubmit with minimal changes.