Vladimir Razuvaev
0af2fe79f2
StandardServer: a bit more validation for parsed json PSR-7 request (related to #202 )
2017-11-28 12:28:54 +07:00
Adrien Crivelli
11c9429fab
Support non pre-parsed PSR-7 request body
...
Because PSR-7 specification only specify that `getParsedBody()` **may**
return the parsed body for `application/json`, we cannot assume that it
is always the case. So if the value returned parsed body is an empty array,
it means we should try to parse it ourselves (`null` would mean no body at
all according to spec).
With this modification we try to used given parsed body, but fallback on
trying to parse the body if necessary. This leave the door open to custom
implementation of parsing if needed, while making it easier to use out of
the box.
2017-11-26 19:57:32 +09:00
Vladimir Razuvaev
71343f2f62
Server: Extracted method for emitting response
2017-08-20 02:32:50 +07:00
Vladimir Razuvaev
1b4f983f3f
Improved docblock comments (suitable for reference docs generation)
2017-08-19 23:01:46 +07:00
Vladimir Razuvaev
83cc9132a0
Server: minor improvements
2017-08-18 02:54:35 +07:00
Vladimir Razuvaev
d578b8a22f
Split sync and async facade methods
2017-08-18 01:49:10 +07:00
Vladimir Razuvaev
03629c1e3c
Refactored error formatting (debugging part)
2017-08-17 18:49:17 +07:00
Vladimir Razuvaev
3971001f6d
Server: additional tests + related fixes
2017-08-15 20:59:48 +07:00
Vladimir Razuvaev
828c6b0fc3
Server: disable query batching by default; allow array as server config
2017-08-15 18:05:09 +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
6a20483b87
Server: Ability to use thunk for root value and context
2017-07-27 20:11:45 +07:00
Vladimir Razuvaev
e04d3300a7
Server: send result for regular responses + prepare response for PSR7 request
2017-07-21 22:11:20 +07:00
Vladimir Razuvaev
b2ec265d4f
Server: ability to execute PSR7 request
2017-07-19 23:35:22 +07:00
Vladimir Razuvaev
81986145fe
Server: moving things around to simplify
2017-07-19 19:55:22 +07:00
Vladimir Razuvaev
e6e531b88b
Server: throw only when there is a configuration or logic error (invariant violation)
2017-07-19 19:30:39 +07:00
Vladimir Razuvaev
919cf80240
Server: batched queries with shared deferreds (promises) #105
2017-07-17 20:31:26 +07:00
Vladimir Razuvaev
0e2ac57515
Split HTTP server execution to canonical replaceable steps: parsing, validation, execution with separate tests for each step
2017-07-17 16:57:30 +07:00
Vladimir Razuvaev
f8c3195e54
Granular methods for HTTP request parsing + tests
2017-07-16 19:04:58 +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