Graphql-code-generator: Typescript Enum config no longer working in 1.0

Created on 19 Mar 2019  路  3Comments  路  Source: dotansimha/graphql-code-generator

Describe the bug
Adding a custom enum to the the typescript plugin config no longer works

To Reproduce
Steps to reproduce the behavior:

  1. Add an enum to your schema
  2. Add a custom enum file
  3. Add the mapping to your config

Example project:
Edit Broken Custom Enums

Expected behavior
It should import my custom enum and use it instead of the default generated one.

Environment:

  • OS: macOS 10.13.6
  • Codegen: 1.0.0
  • Node: 10
bug plugins waiting-for-release

Most helpful comment

Thanks! I finally seem to have a working setup of 1.0, thanks! This is awesome work!

All 3 comments

Hi @NickClark, thank your for reporting this issue.
In 1.0.0, we changed enums to enumValues. Also, I found a bug in the declaration of it, and the ability to map an existing enum was missing.
I fixed and added the missing feature here: https://github.com/dotansimha/graphql-code-generator/pull/1518

Fixed in 1.0.1 馃殌

Thanks! I finally seem to have a working setup of 1.0, thanks! This is awesome work!

Was this page helpful?
0 / 5 - 0 ratings