PHPackages                             zestic/graphql-simple-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. zestic/graphql-simple-client

ActiveLibrary[API Development](/categories/api)

zestic/graphql-simple-client
============================

A simple client to help execute queries and mutations across GraphQL

V0.1.0(2y ago)075↓100%1MITPHPPHP ^8.1

Since Jan 6Pushed 2y agoCompare

[ Source](https://github.com/zestic/graphql-simple-client)[ Packagist](https://packagist.org/packages/zestic/graphql-simple-client)[ RSS](/packages/zestic-graphql-simple-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

GraphQL Client
==============

[](#graphql-client)

A simple package to consume GraphQL APIs.

---

Installation
------------

[](#installation)

`composer require zestic/graphql-simple-client`

---

Usage
-----

[](#usage)

Create an instance of `GraphQL\SimpleClient\Client`:

```
new Client($graphQLURL);

```

or

```
$client = new Client();
$client->setUrl($graphQLURL);

```

---

Response class
--------------

[](#response-class)

Pass in your query, optional variables and headers (eg bearer token), `$variables` and `$headers` are optional

`$response = $client->response($query, $variables, $headers);`

### all()

[](#all)

Use `$response->all();` to get all of the data returned in the response

### errors()

[](#errors)

Use `$response->errors();` to get all the errors returned in the response

### hasErrors()

[](#haserrors)

Use `$response->hasErrors();` to check if the response contains any errors

### Specific data from the response class

[](#specific-data-from-the-response-class)

For example purposes, let's assume you want to get a list of all categories and execute this query.

```
{
    allCategories(first:10) {
        category {
            id,
            name,
            slug,
            description
        }
    }
}

```

Now in order to fetch some meaningful data from the Response class you can do the following:

```
$categories = $response->allCategories->category;

foreach($categories as $category) {
    // Do something with the data?
    $category->id;
    $category->name;
    $category->slug;
    $category->description;
}

```

You can also set, unset or isset data on the Response class.

---

Other responses
---------------

[](#other-responses)

### Raw guzzle response

[](#raw-guzzle-response)

Pass in your query, optional variables and headers (eg bearer token), `$variables` and `$headers` are optional

`$client->raw($query, $variables, $headers);`

### Json

[](#json)

Pass in your query, optional variables and headers (eg bearer token), `$variables` and `$headers` are optional

`$client->json($query, $variables, $headers);`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd5a2c6deedf2f52379d21fa55c9f5c6d0999b0ac1ca2ca2f33293e229107bfe?d=identicon)[iampersistent](/maintainers/iampersistent)

---

Top Contributors

[![eNzyOfficial](https://avatars.githubusercontent.com/u/1686366?v=4)](https://github.com/eNzyOfficial "eNzyOfficial (11 commits)")[![alanwillms](https://avatars.githubusercontent.com/u/704204?v=4)](https://github.com/alanwillms "alanwillms (2 commits)")[![fragglebob](https://avatars.githubusercontent.com/u/551150?v=4)](https://github.com/fragglebob "fragglebob (2 commits)")[![alexbusu](https://avatars.githubusercontent.com/u/4104165?v=4)](https://github.com/alexbusu "alexbusu (1 commits)")[![hisash](https://avatars.githubusercontent.com/u/13863800?v=4)](https://github.com/hisash "hisash (1 commits)")[![ralfclaassens](https://avatars.githubusercontent.com/u/3406968?v=4)](https://github.com/ralfclaassens "ralfclaassens (1 commits)")

---

Tags

phpclientgraphql

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/zestic-graphql-simple-client/health.svg)

```
[![Health](https://phpackages.com/badges/zestic-graphql-simple-client/health.svg)](https://phpackages.com/packages/zestic-graphql-simple-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[gmostafa/php-graphql-client

GraphQL client and query builder.

3217.6M24](/packages/gmostafa-php-graphql-client)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
