GraphQL
in package
Table of Contents
- $client : Client|null
- $jwtToken : string|null
- $userName : string|null
- __construct() : mixed
- GraphQL constructor takes an optional script id.
- MakeRequest() : array<string|int, mixed>|bool|float|int|mixed|stdClass|string|void|null
- askForJwtToken() : mixed
Properties
$client
protected
Client|null
$client
= null
$jwtToken
protected
string|null
$jwtToken
= null
$userName
protected
string|null
$userName
= null
Methods
__construct()
GraphQL constructor takes an optional script id.
public
__construct([null $scriptId = null ]) : mixed
There are three use cases:
- we are calling this class from headless script, we set the username to the script name e.g. "script_test"
- we are calling this class from browser script, we set the username to the logged-in username and script name e.g. "jdoe.script_test"
- we are calling this class without a script, we set the username to just the logged-in username
Parameters
- $scriptId : null = null
Tags
Return values
mixed —MakeRequest()
public
MakeRequest( $query) : array<string|int, mixed>|bool|float|int|mixed|stdClass|string|void|null
Parameters
Tags
Return values
array<string|int, mixed>|bool|float|int|mixed|stdClass|string|void|null —askForJwtToken()
private
askForJwtToken( $table) : mixed