Skip to content

Nodejs - generate GraphQL request incorrect multi line query #337

@HuyNVuong

Description

@HuyNVuong

Describe the bug
On any Nodejs request, GraphQL request is not generating the correct query

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Postman app
  2. Select or generate a graphQL request that has this following template
query {
  object {
    field
    field
  }
}
  1. Click on Code
  2. Search for any Nodejs - Requests
  3. Select it
  4. See the generated Nodejs code snippet

Expected code snippet and corresponding request
GraphQL request should be able to support multi-line query

Screenshots

image

Additional context
A quick fix for this would be adding multi-line character instead of quote character on sanitize body request

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions