SilverStripe\GraphQL\Scaffolding\Scaffolders\SchemaScaffolder
The entry point for a GraphQL scaffolding definition. Holds DataObject type definitions, and their nested Mutation/Query definitions.
Synopsis
class SchemaScaffolder
implements
ManagerMutatorInterface
{
- // constants
- const ALL = '*';
- const CREATE = 'create';
- const READ = 'read';
- const UPDATE = 'update';
- const DELETE = 'delete';
- const READ_ONE = 'readOne';
- // members
- protected array $types = ;
- protected OperationList $queries;
- protected OperationList $mutations;
- // methods
- public static SchemaScaffolder createFromConfig()
- public void __construct()
- public DataObjectScaffolder type()
- public QueryScaffolder|ListQueryScaffolder query()
- public bool|MutationScaffolder mutation()
- public $this removeMutation()
- public $this removeQuery()
- public array getTypes()
- public bool hasType()
- public OperationList getQueries()
- public array getNestedQueries()
- public OperationList getMutations()
- public void addToManager()
- protected void registerFixedTypes()
- protected void registerPeripheralTypes()
Hierarchy
Uses
- SilverStripe\Core\Extensible
Implements
Constants
Name | Value |
---|---|
ALL | '*' |
CREATE | 'create' |
READ | 'read' |
UPDATE | 'update' |
DELETE | 'delete' |
READ_ONE | 'readOne' |
Members
protected
- $mutations — SilverStripe\GraphQL\Scaffolding\Util\OperationList
- $queries — SilverStripe\GraphQL\Scaffolding\Util\OperationList
- $types — array
Methods
protected
- registerFixedTypes() — Registers special SS types that are made available to all schemas, e.g. DBFile ObjectType
- registerPeripheralTypes() — Registers types and respective operations for all ancestors of exposed dataobjects
public
- __construct() — Constructor.
- addToManager() — Adds every DataObject and its dependencies to the Manager.
- createFromConfig() — Create from an array, e.g. derived from YAML.
- getMutations()
- getNestedQueries() — Gets all nested queries for all types
- getQueries()
- getTypes()
- hasType() — Returns true if the type has been added to the scaffolder
- mutation() — Find or make a mutation.
- query() — Find or make a query.
- removeMutation() — Removes a mutation.
- removeQuery() — Removes a query.
- type() — Finds or makes a DataObject definition.