Skip to content

Update NodeJs GraphQL query to support multiline string #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

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