Graphql-code-generator: V0.15.0 `typescript-resolvers` plugin generates non-existing Resolver interfaces with noNamespaces

Created on 13 Dec 2018  路  4Comments  路  Source: dotansimha/graphql-code-generator

Describe the bug
After upgrading to V0.15.0 and adding a workaround for this issue the generated code does not compile anymore because IResolvers contains references to non-existing interfaces.

To Reproduce
Steps to reproduce the behavior:

  1. clone https://github.com/Rachnerd/graphql-code-generator-issue/tree/resolver-issue
  2. npm i && npm run generate
  3. Inspect src/models starting at line: 123.

Used config:

schema: src/**/*.graphql
overwrite: true
generates:
  ./src/models.ts:
    config:
      noNamespaces: true
      interfacePrefix: GQL
    plugins:
      - typescript-common
      - typescript-server
      - typescript-resolvers

Expected behavior
I expect everything to compile.

Environment:

  • OS: Ubuntu 18.04
  • Codegen: 0.15.0
  • Node: v10.8.0

Additional context
I found this issue after upgrading from V0.14.4 to V0.15.0 without changing any configurations or code.

bug plugins waiting-for-release

Most helpful comment

@ardatan
0.16.0-alpha.af0870a1 seems to fix it for both projects ;)

All 4 comments

@Rachnerd
Could you try with canary version 0.16.0-alpha.af0870a1?

@ardatan
0.16.0-alpha.af0870a1 seems to fix it for both projects ;)

What's the timeline for a patch release of this? 馃檪

@Rachnerd @SimenB released 0.15.1 :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zenVentzi picture zenVentzi  路  3Comments

iamdanthedev picture iamdanthedev  路  3Comments

bastman picture bastman  路  3Comments

NickClark picture NickClark  路  3Comments

edorivai picture edorivai  路  3Comments