Skip to content
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

New: printError() #1129

Merged
merged 1 commit into from
Dec 8, 2017
Merged

New: printError() #1129

merged 1 commit into from
Dec 8, 2017

Conversation

leebyron
Copy link
Contributor

@leebyron leebyron commented Dec 8, 2017

Lifted from / inspired by a similar change in #722, this creates a new function printError() (and uses it as the implementation for GraphQLError#toString()) which prints location information in the context of an error.

This is moved from the syntax error where it used to be hard-coded, so it may now be used to format validation errors, value coercion errors, or any other error which may be associated with a location.

Lifted from / inspired by a similar change in #722, this creates a new function `printError()` (and uses it as the implementation for `GraphQLError#toString()`) which prints location information in the context of an error.

This is moved from the syntax error where it used to be hard-coded, so it may now be used to format validation errors, value coercion errors, or any other error which may be associated with a location.
@leebyron leebyron merged commit 5fec485 into master Dec 8, 2017
@leebyron leebyron deleted the printError branch December 8, 2017 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants