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
2017-10-16 23:06:21 +07:00
2017-10-18 16:34:14 +03:00
2017-08-20 22:10:13 +07:00
2015-07-16 00:13:12 +06:00
2017-08-15 21:56:21 +07:00
2017-09-22 23:16:34 +07:00
2015-07-15 22:51:22 +06:00
2017-08-20 22:10:37 +07:00
2016-09-14 18:41:02 +07:00

graphql-php

Build Status Coverage Status Latest Stable Version License

This is a PHP implementation of the GraphQL specification based on the reference implementation in JavaScript.

Installation

Via composer:

composer require webonyx/graphql-php

Documentation

Full documentation is available on the Documentation site as well as in the docs folder of the distribution.

If you don't know what GraphQL is, visit this official website by the Facebook engineering team.

Examples

There are several ready examples in the examples folder of the distribution with specific README file per example.

Contribute

Please refer to CONTRIBUTING.md for information on how to contribute.

Old README.md

Here is a link to the old README.md.

Keep in mind that it relates to the version 0.9.x. It may contain outdated information for newer versions (even though we try to preserve backwards compatibility).

Description
A PHP port of GraphQL reference implementation
Readme MIT 4.1 MiB
Languages
PHP 100%