\Osiset\BasicShopifyAPI\ClientsGraph

GraphQL client.

Summary

Methods
Properties
Constants
request()
handleSuccess()
handleFailure()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

request()

request(\Osiset\BasicShopifyAPI\Clients\string  $query, array  $variables = array(), \Osiset\BasicShopifyAPI\Clients\bool  $sync = true) : array|\GuzzleHttp\Promise\Promise

Runs a request to the Shopify API.

Parameters

\Osiset\BasicShopifyAPI\Clients\string $query

The GraphQL query.

array $variables

The optional variables for the query.

\Osiset\BasicShopifyAPI\Clients\bool $sync

Optionally wait for the request to finish.

Throws

\Osiset\BasicShopifyAPI\Clients\Exception

When missing api password is missing for private apps.

\Osiset\BasicShopifyAPI\Clients\Exception

When missing access key is missing for public apps.

Returns

array|\GuzzleHttp\Promise\Promise

handleSuccess()

handleSuccess(\Psr\Http\Message\ResponseInterface  $resp) : array

Handle response from request.

Parameters

\Psr\Http\Message\ResponseInterface $resp

Returns

array

handleFailure()

handleFailure(\GuzzleHttp\Exception\RequestException  $e) : array

Handle failure of response.

Parameters

\GuzzleHttp\Exception\RequestException $e

Returns

array