Skip to content

1.13.1 -> 1.13.2 removes comments from schema #3825

Closed
@SimenB

Description

@SimenB

Describe the bug
Comments from the schema are gone in the generated code.

To Reproduce
Steps to reproduce the behavior:

  1. My GraphQL schema:
type Query {
  # A name!
  name: String!
}
  1. My GraphQL operations:
# none
  1. My codegen.yml config file:
generates:
  ./gqltypes.ts:
    schema: ./schema.graphql
    plugins:
      - 'typescript'

Expected behavior
1.13.1 generates comments

export type Maybe<T> = T | null;
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: string;
  String: string;
  Boolean: boolean;
  Int: number;
  Float: number;
};

export type Query = {
   __typename?: 'Query';
  /** A name! */
  name: Scalars['String'];
};

1.13.2 does not

diff --git i/gqltypes.ts w/gqltypes.ts
index 41d3dfebf..3172daf0e 100644
--- i/gqltypes.ts
+++ w/gqltypes.ts
@@ -10,6 +10,5 @@ export type Scalars = {
 
 export type Query = {
    __typename?: 'Query';
-  /** A name! */
   name: Scalars['String'];
 };

Environment:

  • OS: macOS
  • @graphql-codegen/...: 1.13.2
  • NodeJS: 12.16.1

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to codegen core/cliwaiting-for-answerWaiting for answer from author

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions