Skip to content

Update NodeJs GraphQL query to support multiline string#339

Merged
umeshp7 merged 2 commits intopostmanlabs:developfrom
HuyNVuong:bugfix/nodejs-graphql-query-multiline
Oct 10, 2020
Merged

Update NodeJs GraphQL query to support multiline string#339
umeshp7 merged 2 commits intopostmanlabs:developfrom
HuyNVuong:bugfix/nodejs-graphql-query-multiline

Conversation

@HuyNVuong
Copy link
Contributor

@umeshp7
Copy link
Contributor

umeshp7 commented Oct 9, 2020

@webholik / @HuyNVuong Could you post the sample snippets before and after this fix?

@webholik
Copy link
Contributor

webholik commented Oct 9, 2020

Before:

var data = JSON.stringify({
  query: 'query {\n    name {\n        features,\n        class\n    },\n    glass{\n        names,\n        bosses,\n    }\n}',
  variables: {}
});

After:

var data = JSON.stringify({
  query: `query {
    name {
        features,
        class
    },
    glass{
        names,
        bosses,
    }
}`,
  variables: {}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants