2016-11-25 17:44:34 +07:00
|
|
|
[](https://github.com/webonyx/graphql-php)
|
|
|
|
[](https://travis-ci.org/webonyx/graphql-php)
|
|
|
|
[](https://coveralls.io/github/webonyx/graphql-php)
|
|
|
|
[](https://packagist.org/packages/webonyx/graphql-php)
|
|
|
|
[](https://packagist.org/packages/webonyx/graphql-php)
|
|
|
|
|
2016-10-23 22:16:32 +07:00
|
|
|
# About GraphQL
|
|
|
|
|
|
|
|
GraphQL is a modern way to build HTTP APIs consumed by web and mobile clients.
|
|
|
|
It is intended to be a replacement for REST and SOAP APIs (even for **existing applications**).
|
|
|
|
|
|
|
|
GraphQL itself is a [specification](https://github.com/facebook/graphql) designed by Facebook
|
|
|
|
engineers. Various implementations of this specification were written
|
|
|
|
[for different languages and environments](http://graphql.org/code/).
|
|
|
|
|
|
|
|
Great overview of GraphQL features and benefits is presented on [official website](http://graphql.org/).
|
|
|
|
All of them equally apply to this PHP implementation.
|
|
|
|
|
|
|
|
|
|
|
|
# About graphql-php
|
|
|
|
|
2016-11-05 23:55:51 +07:00
|
|
|
**graphql-php** is a feature-complete implementation of GraphQL specification in PHP (5.4+, 7.0+).
|
|
|
|
It was originally inspired by [reference JavaScript implementation](https://github.com/graphql/graphql-js)
|
|
|
|
published by Facebook.
|
2016-10-23 22:16:32 +07:00
|
|
|
|
|
|
|
This library is a thin wrapper around your existing data layer and business logic.
|
|
|
|
It doesn't dictate how these layers are implemented or which storage engines
|
|
|
|
are used. Instead it provides tools for creating rich API for your existing app.
|
|
|
|
|
|
|
|
These tools include:
|
|
|
|
|
|
|
|
- Primitives to express your app as a Type System
|
2016-11-25 17:44:34 +07:00
|
|
|
- Tools for validation and introspection of this Type System (for compatibility with tools like [GraphiQL](complementary-tools/#tools))
|
2016-10-23 22:16:32 +07:00
|
|
|
- Tools for parsing, validating and executing GraphQL queries against this Type System
|
2016-11-05 23:55:51 +07:00
|
|
|
- Rich error reporting, including query validation and execution errors
|
|
|
|
- Optional tools for parsing GraphQL Schema Definition language
|
2016-10-23 22:16:32 +07:00
|
|
|
|
2016-11-05 23:55:51 +07:00
|
|
|
Also several [complementary tools](complementary-tools/) are available which provide integrations with
|
|
|
|
existing PHP frameworks, add support for Relay, etc.
|
2016-10-23 22:16:32 +07:00
|
|
|
|
|
|
|
## Current Status
|
2016-11-25 17:44:34 +07:00
|
|
|
First version of this library (v0.1) was released on August 10th 2015.
|
|
|
|
|
2017-01-19 19:28:41 +07:00
|
|
|
Current version (v0.9) supports all features described by GraphQL specification
|
2016-10-23 22:16:32 +07:00
|
|
|
(including April 2016 add-ons) as well as some experimental features like
|
|
|
|
Schema Language parser.
|
|
|
|
|
2016-12-14 20:30:08 +07:00
|
|
|
Ready for real-world usage.
|
2016-11-25 17:44:34 +07:00
|
|
|
|
|
|
|
## Github
|
|
|
|
Project source code is [hosted on GitHub](https://github.com/webonyx/graphql-php).
|