Documentation

SchemaConfig
in package

Schema configuration class.

Could be passed directly to schema constructor. List of options accepted by create method is described in docs.

Usage example:

$config = SchemaConfig::create()
    ->setQuery($myQueryType)
    ->setTypeLoader($myTypeLoader);

$schema = new Schema($config);

Table of Contents

$assumeValid  : bool
$astNode  : SchemaDefinitionNode|null
$directives  : array<string|int, Directive>|null
$extensionASTNodes  : array<string|int, SchemaTypeExtensionNode>
$mutation  : ObjectType|null
$query  : ObjectType|null
$subscription  : ObjectType|null
$typeLoader  : callable|null
$types  : array<string|int, Type>|callable
create()  : SchemaConfig
Converts an array of options to instance of SchemaConfig (or just returns empty config when array is not passed).
getAssumeValid()  : bool
getAstNode()  : SchemaDefinitionNode|null
getDirectives()  : array<string|int, Directive>|null
getExtensionASTNodes()  : array<string|int, SchemaTypeExtensionNode>
getMutation()  : ObjectType|null
getQuery()  : ObjectType|null
getSubscription()  : ObjectType|null
getTypeLoader()  : callable|null
getTypes()  : array<string|int, Type>|callable
setAssumeValid()  : SchemaConfig
setAstNode()  : SchemaConfig
setDirectives()  : SchemaConfig
setExtensionASTNodes()  : mixed
setMutation()  : SchemaConfig
setQuery()  : SchemaConfig
setSubscription()  : SchemaConfig
setTypeLoader()  : SchemaConfig
setTypes()  : SchemaConfig

Properties

Methods

create()

Converts an array of options to instance of SchemaConfig (or just returns empty config when array is not passed).

public static create([array<string|int, mixed> $options = [] ]) : SchemaConfig
Parameters
$options : array<string|int, mixed> = []
Return values
SchemaConfig

getAssumeValid()

public getAssumeValid() : bool
Return values
bool

getTypeLoader()

public getTypeLoader() : callable|null
Return values
callable|null

getTypes()

public getTypes() : array<string|int, Type>|callable
Return values
array<string|int, Type>|callable

Search results