Drop support non pre-parsed PSR-7 request body #218
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've realized that PR #202 was probably a mistake and should be reversed. The fact that
$request->getParsedBody()might be empty was due to an incorrect use of Zend Expressive. And I now think that it is not, and should not be, the responsibility ofgraphql-phpto parse a PSR-7 request.I've since updated my code to properly configure Zend Expressive to parse the request with BodyParamsMiddleware before reaching
graphql-php.If we don't merge this PR, then suddenly
graphql-phpwill have to re-implement all kind of request parsing method (i'm thinkingmultipart/form-data) just in case the request was not parsed beforehand. And that would probably not be something we would like to have in that project. Instead it should live in a different project specialized in request parsing.