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. [API Development](/categories/api)
4. /
5. travelience/laravel-graphql-client

ActiveLibrary[API Development](/categories/api)

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 3w 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 31% 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://avatars.githubusercontent.com/u/2293792?v=4)[Rodrigo Ramirez](/maintainers/xpromx)[@xpromx](https://github.com/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)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)[pixelant/pxa-social-feed

Add Facebook, Instagram, and Twitter feeds to your site.

2349.3k](/packages/pixelant-pxa-social-feed)

PHPackages © 2026

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