class HTTPProvider implements PersistedQueryMappingProvider

Class HTTPProvider

Traits

Configurable
Injectable

Config options

timeout int Timeout for the HTTP request
schemaToURL array Example: SilverStripe\Core\Injector\Injector: SilverStripe\GraphQL\PersistedQuery\PersistedQueryMappingProvider: class :SilverStripe\GraphQL\PersistedQuery\HTTPProvider: properties: schemaMapping: default: 'http://example.com/mapping.json'

Methods

__construct(HTTPClient $client = null)

HTTPProvider constructor.

array
getQueryMapping(string $schemaKey = 'default')

return a map from to

string
getByID(string $queryID, string $schemaKey = 'default')

return a query given an ID

mixed
setSchemaMapping(array $mapping)

No description

array
getSchemaMapping()

No description

$this
setClient(HTTPClient $client)

No description

getClient()

No description

Details

at line 61
__construct(HTTPClient $client = null)

HTTPProvider constructor.

Parameters

HTTPClient $client

at line 75
array getQueryMapping(string $schemaKey = 'default')

return a map from to

Parameters

string $schemaKey

Return Value

array

at line 113
string getByID(string $queryID, string $schemaKey = 'default')

return a query given an ID

Parameters

string $queryID
string $schemaKey

Return Value

string

at line 124
mixed setSchemaMapping(array $mapping)

Parameters

array $mapping

Return Value

mixed

at line 145
array getSchemaMapping()

Return Value

array

at line 154
$this setClient(HTTPClient $client)

Parameters

HTTPClient $client

Return Value

$this

at line 164
HTTPClient getClient()

Return Value

HTTPClient