Simon Podlipsky
6a5325a448
Another code cleanup
2019-06-12 15:43:17 +02:00
Simon Podlipsky
a22a083220
Cleanup Warning
2019-06-12 11:03:14 +02:00
Simon Podlipsky
06529e1924
Upgrade Doctrine CS
2019-03-28 12:18:35 +01:00
Vladimir Razuvaev
b088720d40
Merge pull request #458 from simPod/upgrade-phpstan
...
Upgrade PHPStan
2019-03-23 17:57:09 +07:00
Simon Podlipsky
23ece09407
Upgrade PHPStan
2019-03-18 13:02:58 +01:00
Jáchym Toušek
1864facda8
Fix annotations
2019-03-18 12:31:33 +01:00
Vladimir Razuvaev
c45fa1a4b1
Default Error Formatting: Display error category
under extensions
key ( #389 )
2018-11-27 16:37:33 +07:00
Vladimir Razuvaev
bdbb30c604
Schema validation improvements
2018-11-22 22:23:14 +07:00
Simon Podlipsky
0063bd6c15
Fix CS in src/Error
2018-10-05 10:47:57 +02:00
spawnia
c4fe304efe
Fix coding style
2018-09-03 21:43:02 +02:00
spawnia
326e0b4719
Add Debug::RETHROW_UNSAFE_EXCEPTIONS flag
...
This allows for a more granular default for which Exceptions are thrown, taking
the settings made through the ClientAware interface into account.
- Add docs
- Add a test case
- Differentiate clearly from other test
2018-09-03 21:18:04 +02:00
Benedikt Franke
503ac4619a
Check if an exception is internal before rethrowing
2018-08-31 17:45:41 +02:00
Vladimir Razuvaev
90623f68d7
Fixed code style after recent changes
2018-08-22 12:07:21 +07:00
Vladimir Razuvaev
23fce6385f
Merge pull request #319 from jrots/master
...
Fix for fatal php error: Call to a member function getLocation() on null, before normal error handling
2018-08-20 16:27:10 +07:00
Simon Podlipsky
4c327a6c16
Fix CS in Validator folder
2018-08-08 10:44:05 +02:00
Vladimir Razuvaev
f4008f0fb2
Error formatting: display error extensions under extensions
key
2018-08-07 23:33:20 +07:00
Jayme Rotsaert
942d4995c5
Fix: fatal Call to a member function getLocation(), before normal error is thrown
2018-08-01 18:16:48 +02:00
Simon Podlipsky
4bc3b7885c
Fix CS in Error folder
2018-06-19 19:50:12 +02:00
Daniel Tschinder
97e8a9e200
Move schema validation into separate step (type constructors)
...
This is the second step of moving work from type constructors to the schema validation function.
ref: graphql/graphql-js#1132
2018-02-15 12:14:08 +01:00
Daniel Tschinder
60df83f47e
Preserve original coercion errors, improve error quality.
...
This is a fairly major refactoring of coerceValue which returns an Either so it can return a complete collection of errors. This allows originalError to be preserved for scalar coercion errors and ensures *all* errors are represented in the response.
This had a minor change to the logic in execute / subscribe to allow for buildExecutionContext to abrupt complete with multiple errors.
ref: graphql/graphql-js#1133
2018-02-13 16:51:44 +01:00
Daniel Tschinder
6d45a22ba4
Always extract extensions from the original error if possible
...
ref: graphql/graphql-js#2d08496720088dbe65ebea312c8526bd48fb8ee8
2018-02-13 10:42:56 +01:00
Daniel Tschinder
cf276340a4
Fix printError/locations for multiple nodes.
...
If a GraphQLError represents multiple nodes across files (could happen for validation across multiple parsed files) then the reported locations and printError output can be incorrect for the second node. This ensures locations are derived from nodes whenever possible to get correct location and amends comment documentation.
ref: graphql/graphql-js#1131
2018-02-13 10:42:51 +01:00
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
Daniel Tschinder
0c984a83bb
Allow constructing GraphQLError with single node.
...
A common case is encountering an error which blames to a single AST node. Ensure the GraphQLError constructor can handle this case.
ref: graphql/graphql-js#1123
2018-02-11 21:18:54 +01:00
Daniel Tschinder
c4f11a577e
Allow to extend GraphQL errors with additional properties
...
ref: graphql/graphql-js#928
2018-02-10 18:45:38 +01:00
Vladimir Razuvaev
a1e06b2e61
Account for query offset in files for errors
2017-09-20 18:36:19 +07:00
Vladimir Razuvaev
bd444752f8
Documentation and docblock improvements
2017-08-20 16:00:44 +07:00
Vladimir Razuvaev
1b4f983f3f
Improved docblock comments (suitable for reference docs generation)
2017-08-19 23:01:46 +07:00
Vladimir Razuvaev
03629c1e3c
Refactored error formatting (debugging part)
2017-08-17 18:49:17 +07:00
Vladimir Razuvaev
1d38643538
Ability to re-throw resolver exceptions
2017-08-17 03:01:23 +07:00
Vladimir Razuvaev
51e877bfba
Improving docblock comments
2017-08-17 02:15:49 +07:00
Vladimir Razuvaev
a50c9a4c1f
Renamed error category constants
2017-08-17 02:13:44 +07:00
Vladimir Razuvaev
b9d3a11785
Extracted lazy schema test; minor related refactoring
2017-08-14 20:41:08 +07:00
Vladimir Razuvaev
f9eb14869f
Removed callbacks in field types (previously deprecated in #35 )
2017-08-14 00:50:24 +07:00
Vladimir Razuvaev
6845b28a35
Deprecated GraphQL\Type\Definition\Config
( #148 )
2017-08-14 00:09:02 +07:00
Vladimir Razuvaev
34eae0b891
Schema validation + tests ( #148 )
2017-08-13 23:04:03 +07:00
Vladimir Razuvaev
f911fac7b1
Default error reporting now includes "category" key for every error
2017-08-08 02:02:07 +07:00
Vladimir Razuvaev
e7838d2253
Do not output trace for trivial errors even in debug mode
2017-07-25 20:08:34 +07:00
Vladimir Razuvaev
87c812b221
Better located error handling
2017-07-19 20:08:42 +07:00
Vladimir Razuvaev
38922dbbed
Default error formatter now returns "Internal server error" unless error is client-aware and safe to report directly to end-users
2017-07-18 20:57:30 +07:00
Vladimir Razuvaev
794d3672ef
Initial pass on standard server implementation (also deprecated current GraphQL\Server which is undocumented anyway)
2017-07-14 19:44:18 +07:00
Vladimir Razuvaev
aaa5b7af41
Global config; descriptor moved to appropriate namespace; minor cleanup
2017-07-12 13:16:34 +07:00
Vladimir Razuvaev
296544089c
Moved GraphQL\Utils to GraphQL\Utils\Utils
2017-07-10 19:53:46 +07:00
Vladimir Razuvaev
ed28deda81
Replaced trigger_error with Warning for resolveType warning
2017-07-10 19:38:12 +07:00
Vladimir Razuvaev
9f4980ce49
Fix for broken build on PHP < 5.6
2017-07-04 22:18:55 +07:00
Vladimir Razuvaev
90e1ea4d22
Added tools for warnings with ability to suppress them
2017-07-04 17:13:05 +07:00
Vladimir Razuvaev
c5484ae6f9
Convert error to warning for non-compliant usage of __ in names
2017-07-04 00:28:17 +07:00
Daniel Tschinder
65ef159ddc
Support PHP7 error exceptions everywhere
...
Also replace \Error with \Throwable
2017-06-25 07:33:28 -07:00
Jeremiah VALERIE
6d5b4e5a37
Use dedicated exception for scalar type parsing error
2017-05-29 10:32:48 +02:00
OwlyCode
d022b19b4e
Added compatibility with php7 error handling.
2017-01-12 17:18:25 +01:00