joonlabs / php-graphql
A PHP implementation of the GraphQL specifications
Installs: 4 130
Dependents: 2
Suggesters: 0
Security: 0
Stars: 53
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: >=8.0
Requires (Dev)
- phpbench/phpbench: 1.0.1
- phpunit/phpunit: 9.5.4
README
php-graphql
php-graphql is a pure php implementation of the latest GraphQL specification based on the reference implementation in JavaScript.
Installation
Via composer:
composer require joonlabs/php-graphql
Via git submodule:
git clone https://github.com/joonlabs/php-graphql.git
For more information, see the doc pages
Documentation
The library's documentation is available at https://joonlabs.github.io/php-graphql/ or in the docs folder.
Examples
Examples can be found in the examples directory and are additionally discussed in the documentation.
Motivation
This project was developed out of internal needs in the company. We decided to go with an own implementation to stay in control of performance critical parts, implement cache systems and support file upload from scratch. Also this library does not use arrays but explicit parameters for initialization and configuration of types, fields and other objects. Thanks to features like named arguments which were added by PHP 8, this library achieves a high readability. As nice sideeffect this library seems to outperform the currently most used library webonyx/graphql-php in terms of speed in many use cases (please see https://github.com/joonlabs/graphql-benchmarks for reference).
Backers and sponsors
see joonlabs.com
see leafx.de
License
Fore more infromation regarding the license, see the LICENSE file.