2017 © Pedro Peláez
 

library graphql-client

graphql

image

yarec/graphql-client

graphql

  • Wednesday, June 6, 2018
  • by yarec
  • Repository
  • 1 Watchers
  • 0 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 94 % Grown

The README.md

Usage

$endpoint = 'http://api.example.com/graphql';
$client = new Client($endpoint);

// for one
$opts = [
    'args' => [
        'id'=> 1234
    ],
    'resp' => [
        'id',
        'name',
        'email'
    ]
];

$data = $client->query('user', $opts);


//for list
$opts = [
    'params' => [
        'per_page' => 3,
        'page' => 2,
    ],
    'args' => ['sex' => 'male'],
    'resp' => [
        'data' => [
            'id',
            'name',
            'email'
        ]
    ]
];

$data = $this->client->query('users', $opts);

DEV

composer config repositories.gql-client path $PATH/yarec/graphql-client, (*1)

composer require yarec/graphql-client -vvv, (*2)

The Versions

06/06 2018

dev-master

9999999-dev

graphql

  Sources   Download

The Requires