Skip to content

SchemaPrinter generates different results on Windows #2973

@ajkerr

Description

@ajkerr

Describe the bug

The SchemaPrinter utility generates slightly different results for schemas that contain multi-line descriptions when run on Windows vs Linux/macOS.

For some reason, \r\n line endings are used for multi-line descriptions only, and an extra blank line is inserted after the opening """.

To Reproduce

Using a schema like so:

type Query {
  """
  This does
  something.
  """
  myQuery: String
}

The SchemaPrinter will generate something like this on Windows (I'm using Java literals here for illustration - the actual results contain binary carriage returns and line feeds):

type Query {\n
  """\n
  \r\n
  This does\r\n
  something.\r\n
  """\n
  myQuery: String\n
}\n

On Unix-based systems, the results are as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions