2017 © Pedro Peláez
 

library graphql-bulk-resolver

GraphQL Bulk Resolver

image

joskfg/graphql-bulk-resolver

GraphQL Bulk Resolver

  • Sunday, June 10, 2018
  • by Joskfg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 139 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 90 % Grown

The README.md

GraphQL Bulk Resolver

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Trait to avoid N+1 problem in GraphQL when using the webonyx/graphql-php or any wrapper. It is based in the Deferred resolvers that provide the library and allow you to work with them in an easy way., (*2)

Documentation

The trait split the resolver in two parts, fetch and pluck., (*3)

Fetch

This part receive all the root objects in one array, so you can process all of them in one shoot and return all the data in the best way to be processed in the pluck., (*4)

Pluck

The method receives all the data processed and the root that is requesting the info, so it should search inside the data processed and return the specific data., (*5)

You must implement the resolver using the DeferredResolverInterface and use the trait in the resolver type like this:, (*6)

'resolve' => $this->deferredResolve(new MyResolver());

You can see an article about the package at https://medium.com/@JoseCardona/solving-graphql-n-1-in-php-92ed9161dd7b, (*7)

Testing

joskfg/graphql-bulk-resolver has a PHPUnit test suite and a coding style compliance test suite using PHP CS Fixer., (*8)

To run the tests, run the following command from the project folder., (*9)

``` bash $ docker-compose run test, (*10)


To run interactively using [PsySH](http://psysh.org/): ``` bash $ docker-compose run psysh

License

The MIT license. Please see LICENSE for more information., (*11)

The Versions

10/06 2018
10/06 2018

dev-feature/Imrpove-code-quality

dev-feature/Imrpove-code-quality https://github.com/joskfg/graphql-bulk-resolver

GraphQL Bulk Resolver

  Sources   Download

MIT

The Requires

 

The Development Requires

resolver bulk graphql joskfg n plus 1

27/04 2018

0.2

0.2.0.0 https://github.com/joskfg/graphql-bulk-resolver

GraphQL Bulk Resolver

  Sources   Download

MIT

The Requires

 

The Development Requires

resolver bulk graphql joskfg n plus 1

27/04 2018

dev-feature/Allow-call-resolver-in-multiple-phases-like-in-circle-relationship

dev-feature/Allow-call-resolver-in-multiple-phases-like-in-circle-relationship https://github.com/joskfg/graphql-bulk-resolver

GraphQL Bulk Resolver

  Sources   Download

MIT

The Requires

 

The Development Requires

resolver bulk graphql joskfg n plus 1

08/04 2018

0.1

0.1.0.0 https://github.com/joskfg/graphql-bulk-resolver

GraphQL Bulk Resolver

  Sources   Download

MIT

The Requires

 

The Development Requires

resolver bulk graphql joskfg n plus 1