SilverStripe\GraphQL\TypeCreator
Represents a GraphQL type in a way that allows customization through SilverStripe's {@link DataExtension} system.
Synopsis
class TypeCreator
{
- // members
- protected Manager $manager;
- protected bool $inputObject = false;
- // methods
- public void __construct()
- public array attributes()
- public array fields()
- public array|callable interfaces()
- public array getFields()
- public bool isInputObject()
- public Type toType()
- public array toArray()
- public array getAttributes()
- protected callable|null getFieldResolver()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
Members
protected
- $inputObject
—
SilverStripe\GraphQL\bool
Determines if the object should be cast as an {@link InputObjectType} Otherwise will be cast as a normal {@link ObjectType} - $manager — SilverStripe\GraphQL\Manager
Methods
protected
- getFieldResolver() — Locate potential callback for resolving this field at runtime.
public
- __construct()
- attributes() — Returns any fixed attributes for this type. E.g. 'name' or 'description'
- fields() — Returns the internal field structures, without field resolution.
- getAttributes() — Gets the list of all computed attributes for this type.
- getFields() — Returns field structure with field resolvers added.
- interfaces() — Returns the list of interfaces (or function to evaluate this list) which this type implements.
- isInputObject() — True if this is an input object, which accepts new field values.
- toArray() — Convert this silverstripe graphql type into an array format accepted by the type constructor.
- toType() — Build the constructed type backing this object.