PHPackages                             mathsgod/gql-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. mathsgod/gql-client

ActiveLibrary[API Development](/categories/api)

mathsgod/gql-client
===================

A simple GraphQL client tools for php

3.1.1(4y ago)0187[1 PRs](https://github.com/mathsgod/gql-client/pulls)4MITPHPPHP ^8.0CI failing

Since Jan 4Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/mathsgod/gql-client)[ Packagist](https://packagist.org/packages/mathsgod/gql-client)[ RSS](/packages/mathsgod-gql-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (3)Versions (16)Used By (4)

gql-client
==========

[](#gql-client)

Client example
--------------

[](#client-example)

### Query

[](#query)

```
$client = new GQL\Client($server_address);

$data = $client->query([
    "me" => [
        "first_name",
        "last_name"
    ]
]);
```

#### With arguments

[](#with-arguments)

```
$client = new GQL\Client($server_address);

$data = $client->query([
    "getUser" => [
        "__args"=>[
            "id"=>1
        ],
        "first_name",
        "last_name",
        "findInvoice"=>[
            "__args"=>[
                "status"=>"pending"
            ],
            "invoice_no"
        ]
    ]
]);
```

### Mutation and Subscription

[](#mutation-and-subscription)

```
$data = $client->mutation("updateUser",[
    "__args"=>["user_id"=>1,"first_name"=>"Raymond"]
]);

$data=$client->subscription("createUser",[
    "__args"=>["first_name"=>"raymond"]
]);
```

### auth

[](#auth)

```
$client = new GQL\Client($server_address);

$client->auth=["username","password"];

$data = $client->query([
    "me" => [
        "first_name",
        "last_name"
    ]
]);
```

### no ssl check

[](#no-ssl-check)

```
$client = new GQL\Client($server_address,["verify"=>false]);

$data = $client->query([
    "me" => [
        "first_name",
        "last_name"
    ]
]);
```

Builder
-------

[](#builder)

### Query

[](#query-1)

```
echo Builder::Query([
     "me" => [
        "first_name",
        "last_name"
    ]
]);

// query{ me {first_name last_name} }
```

### Mutation

[](#mutation)

```
echo Builder:Mutation("updateUser",[
    "__args"=>[
        "user_id"=>1,
        "first_name"=>"Raymond"
    ]
]);
// mutation{ updateUser(user_id:1, first_name:"Raymond") }
```

### Subscription

[](#subscription)

```
echo Builder:Mutation("createUser",["__args"=>["first_name"=>"Raymond"]]);
// subscription{ createUser(first_name:"Raymond") }
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance50

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% 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

Every ~95 days

Total

14

Last Release

1488d ago

Major Versions

1.2.0 → 2.0.02020-12-30

2.2.0 → 3.0.02021-08-20

PHP version history (5 changes)1.0.2PHP &gt;=5.6

1.1.0PHP &gt;=7.0

2.0.0PHP ^7.0

2.2.0PHP ^7.0 || ^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18732337?v=4)[Raymond](/maintainers/mathsgod)[@mathsgod](https://github.com/mathsgod)

---

Top Contributors

[![mathsgod](https://avatars.githubusercontent.com/u/18732337?v=4)](https://github.com/mathsgod "mathsgod (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

graphqlphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mathsgod-gql-client/health.svg)

```
[![Health](https://phpackages.com/badges/mathsgod-gql-client/health.svg)](https://phpackages.com/packages/mathsgod-gql-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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