Controller
class Controller extends Controller implements Flushable (View source)
Top level controller for handling graphql requests.
Constants
CACHE_FILENAME |
|
Properties
static private array | $cors | Cors default config |
|
static private bool | $cache_types_in_filesystem | If true, store the fragment JSON in a flat file in assets/ |
|
static private bool | $cache_on_flush | Toggles caching types to the file system on flush This is set to false in test state see DisableTypeCacheState |
Methods
Handles requests to the index action (e.g. /graphql)
No description
No description
No description
Get an instance of the authorization Handler to manage any authentication requirements
No description
Process the CORS config options and add the appropriate headers to the response.
No description
No description
No description
Introspect the schema and persist it to the filesystem
No description
No description
Write the types json to a flat file, if silverstripe/assets is available
No description
Details
__construct(Manager $manager = null)
HTTPResponse
index(HTTPRequest $request)
Handles requests to the index action (e.g. /graphql)
Manager
getManager(HTTPRequest $request = null)
$this
setManager(Manager $manager)
$this
setAssetHandler(GeneratedAssetHandler $handler)
GeneratedAssetHandler
getAssetHandler()
Handler
getAuthHandler()
Get an instance of the authorization Handler to manage any authentication requirements
string
getToken()
HTTPResponse
addCorsHeaders(HTTPRequest $request, HTTPResponse $response)
Process the CORS config options and add the appropriate headers to the response.
array
getCorsConfig()
array
getMergedCorsConfig()
Controller
setCorsConfig(array $config)
writeSchemaToFilesystem()
Introspect the schema and persist it to the filesystem
removeSchemaFromFilesystem()
writeTypes(string $content)
processTypeCaching()
Write the types json to a flat file, if silverstripe/assets is available