A PHP GraphQL library designed to be extensible: digiaonline/graphql-php
In November 2017 I covered the state of GraphQL in PHP, and there were two viable options for developers looking to use GraphQL in their applications:
Around a year later, not much has changed. Both of these libraries have evolved, as has the GraphQL specification itself. At the GraphQL Finland 2018 conference in Helsinki, Christoffer Niska gave a presentation on GraphQL in PHP.
A library designed to be future proof
Christoffer and his team had plenty of hands on experience with GraphQL in PHP. They felt that the while the existing libraries worked fine, they were too difficult to extend. This became apparent with the addition of Schema Directives and other similar efforts in the GraphQL ecosystem would be hard to implement in them.
With Niska taking the lead, the team started an effort on a new GraphQL library for PHP in February 2018. While this was also driven by the urge to learn what made GraphQL tick, the team also saw potential of the library as an Open Source project.
Several months and multiple iterations later, the first release of digiaonline/graphql-php was launched on October 19th 2018. The MIT licensed project has extensive test coverage, and the team welcomes pull requests to the library as the project evolves.
The library is distributed via Packagist, and can be installed with Composer. Learn about usage on the documentation on GitHub, and the reasoning behing implementing of a new library from scratch on the presentation below: