PHPackages                             travelience/laravel-graphql-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. travelience/laravel-graphql-client

ActiveLibrary

travelience/laravel-graphql-client
==================================

GraphQL Client For Laravel

63732[1 issues](https://github.com/xpromx/laravel-graphql-client/issues)[1 PRs](https://github.com/xpromx/laravel-graphql-client/pulls)PHP

Since Aug 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xpromx/laravel-graphql-client)[ Packagist](https://packagist.org/packages/travelience/laravel-graphql-client)[ RSS](/packages/travelience-laravel-graphql-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Installation
============

[](#installation)

### You can install this package via composer using this command:

[](#you-can-install-this-package-via-composer-using-this-command)

```
composer require travelience/laravel-graphql-client

```

### Or add in your composer.json

[](#or-add-in-your-composerjson)

```
   "require": {
        "travelience/laravel-graphql-client": "dev-master"
   },

```

### Service Provider

[](#service-provider)

```
Travelience\GraphQL\GraphQLServiceProvider::class,

```

### Config Files

[](#config-files)

In order to edit the default configuration for this package you may execute:

```
php artisan vendor:publish

```

Example
=======

[](#example)

```
$query = "
        { users{id,name,email} }
        ";

$r = GraphQL::query( $query );

// check if the response has errors
if( $r->hasErrors() )
{
    // return a string of the first error messasge
    dd($r->getErrorMessage());

    // return a laravel collection with the errors
    dd($r->errors());
}

// will return laravel collection
dd( $r->get('users') );
dd( $r->users );
```

Query params
------------

[](#query-params)

```
/**
* @param  string  $query : { users{id, name, email} }
* @param  array  $params : extra parameters in the POST
* @param  integer $cache : in minutes
* @return Response
*/
$r = GraphQL::query( $query, $params=[], $cache=false );
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/40317651aaee0d2dc0b49f6bf17d5eb02e5bef5e84ca7dc3346a50a5d00e30cd?d=identicon)[xpromx](/maintainers/xpromx)

---

Top Contributors

[![xpromx](https://avatars.githubusercontent.com/u/2293792?v=4)](https://github.com/xpromx "xpromx (4 commits)")

### Embed Badge

![Health badge](/badges/travelience-laravel-graphql-client/health.svg)

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

PHPackages © 2026

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