GraphQL for Doctrine using Hydrators
Clone or download
Pull request Compare This branch is 1 commit behind API-Skeletons:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
src
test
.coveralls.yml
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpcs.xml.dist
phpstan.neon
phpunit.xml.dist

README.md

GraphQL for Doctrine using Hydrators

Build Status Coverage PHPStan Gitter Patreon Total Downloads

This library uses Doctrine native traversal of related objects to provide full GraphQL querying of entities and all related fields and entities. Entity metadata is introspected and is therefore Doctrine data driver agnostic. Data is collected with hydrators thereby allowing full control over each field using hydrator filters, strategies and naming strategies. Multiple object managers are supported. Multiple hydrator configurations are supported. Works with GraphiQL.

A range of filters are provided to filter collections at any location in the query.

Doctrine provides easy taversal of your database. Consider the following imaginary query:

$entity->getRelation()->getField1()
                      ->getField2()
                      ->getManyToOne()->getName()
                                      ->getField3()
       ->getOtherRelation()->getField4()
                           ->getField5()

And see it realized in GraphQL with fine grained control over each field via hydrators:

{ entity { relation { field1 field2 manyToOne { name field3 } } otherRelation { field4 field5 } } }

Read the Documentation