Skip to content

New: printError()#1129

Merged
leebyron merged 1 commit intomasterfrom
printError
Dec 8, 2017
Merged

New: printError()#1129
leebyron merged 1 commit intomasterfrom
printError

Conversation

@leebyron
Copy link
Copy Markdown
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