This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A small wrapper around webonyx/graphql-php

dev-master 2018-05-10 00:32 UTC

This package is auto-updated.

Last update: 2021-09-20 18:02:27 UTC


This library aims at providing an Object Oriented Way to execute GraphQL queries using webonyx/graphql-php without going crazy on unit test where it is being used on your code.


You should install webonyx/graphql-php in order to use the wrapper.


The suggested installation method is via composer:

composer require malukenho/graphql-wrapper


You don't need to configure anything special in order to use the wrapper, because all the API from webonyx/graphql-php is constructed based on static methods. The wrapper simply calls the original static API wrapping it an object.

$client = new \Malukenho\GraphQL\GraphQLWrapper();

That provides us a more sane API to work, and it is way more easy to test.