SilverStripe\GraphQL\PersistedQuery\HTTPProvider
Class HTTPProvider
Synopsis
class HTTPProvider
implements
PersistedQueryMappingProvider
{
- // members
- private static integer $timeout = 5;
- protected array $schemaToURL = ;
- protected HTTPClient $client;
- protected array $responseCache = ;
- // methods
- public void __construct()
- public array getQueryMapping()
- public string getByID()
- public $this setSchemaMapping()
- public array getSchemaMapping()
- public $this setClient()
- public HTTPClient getClient()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Injector\Injectable
Implements
Members
private
- $timeout
—
int
Timeout for the HTTP request
protected
- $client — SilverStripe\GraphQL\PersistedQuery\HTTPClient
- $responseCache
—
array
A cache of schema key to HTTP responses - $schemaToURL
—
array
Example: <code> SilverStripe\Core\Injector\Injector: SilverStripe\GraphQL\PersistedQuery\PersistedQueryMappingProvider: class :SilverStripe\GraphQL\PersistedQuery\HTTPProvider: properties: schemaMapping: default: 'http://example.com/mapping.json' </code>
Methods
public
- __construct() — HTTPProvider constructor.
- getByID() — return a query given an ID
- getClient()
- getQueryMapping() — return a map from <id> to <query>
- getSchemaMapping()
- setClient()
- setSchemaMapping()