Graphql-code-generator: JSDoc: Failed to transform Input Types

Created on 27 May 2020  路  3Comments  路  Source: dotansimha/graphql-code-generator

Describe the bug
Input types are not generated correctly with Plugin JSDoc. Instead of a type definition it just prints [object Object].

To Reproduce
Steps to reproduce the behavior:

  1. My GraphQL schema:
input DemoInput {
  test: String!
}

  1. My codegen.yml config file:
generates:
  schema.js:
    plugins:
      - jsdoc
  1. False Result
///schema.js

[object Object]

Expected behavior

///schema.js
/**
 * @typedef {Object} DemoInput
 * @property {String} test
 */

Environment:

Used: https://graphql-code-generator.com/

  • OS:
  • @graphql-codegen/...:
  • NodeJS:

Additional context

bug needs reproduction plugins

Most helpful comment

@dotansimha pretty sure this can be closed 鉁岋笍

All 3 comments

Could you create a reproduction using the template below?
https://codesandbox.io/s/github/dotansimha/graphql-code-generator-issue-sandbox-template

@ardatan Done: https://codesandbox.io/s/distracted-curie-m8cr0?file=/schema.js

See schema.js for wrong output.

@dotansimha pretty sure this can be closed 鉁岋笍

Was this page helpful?
0 / 5 - 0 ratings