Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Tschinder
15374a31dd New: printError()
Lifted from / inspired by a similar change in graphql/graphql-js#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.

ref: graphql/graphql-js

BREAKING CHANGE: The SyntaxError message does not contain the codeframe anymore and only the message, (string) $error will print the codeframe.
2018-02-12 12:23:39 +01:00
Vladimir Razuvaev
a1e06b2e61 Account for query offset in files for errors 2017-09-20 18:36:19 +07:00
Vladimir Razuvaev
296544089c Moved GraphQL\Utils to GraphQL\Utils\Utils 2017-07-10 19:53:46 +07:00
Vladimir Razuvaev
34ca931533 Sanity check to ensure that GraphQL query is string 2017-02-24 17:14:30 +07:00
Andreas Heiberg
80a662564e [style changes] arrays and callback 2016-11-16 17:29:50 +07:00
vladar
20c482ce2f Version 0.1 2015-07-15 23:05:46 +06:00