-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathGraphRequester.php
More file actions
34 lines (29 loc) · 823 Bytes
/
GraphRequester.php
File metadata and controls
34 lines (29 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
declare(strict_types=1);
namespace Gnikyt\BasicShopifyAPI\Contracts;
use GuzzleHttp\Promise\Promise;
use GuzzleHttp\Psr7\Uri;
/**
* Reprecents Graph client.
*/
interface GraphRequester extends LimitAccesser, TimeAccesser, SessionAware, ClientAware
{
/**
* Runs a request to the Shopify API.
*
* @param string $query The GraphQL query.
* @param array $variables The optional variables for the query.
* @param bool $sync Optionally wait for the request to finish.
*
* @return array|Promise
*/
public function request(string $query, array $variables = [], bool $sync = true);
/**
* Returns the base URI to use.
*
* @throws \Exception For missing shop domain.
*
* @return Uri
*/
public function getBaseUri(): Uri;
}