SilverStripe\GraphQL\Scaffolding\Scaffolders\CRUD\Create
A generic "create" operation for a DataObject.
Synopsis
class Create
extends MutationScaffolder
implements
OperationResolver,CRUDInterface
{
- // Inherited members from OperationScaffolder
- protected array $args;
- protected $description;
- // methods
- public void __construct()
- public string getName()
- public void addToManager()
- protected array createDefaultArgs()
- protected InputObjectType generateInputType()
- protected string inputTypeName()
- public void resolve()
- private string argName()
- // Inherited methods from MutationScaffolder
- public void __construct()
- public void addToManager()
- public array scaffold()
- public void getTypeName()
- protected Type getType()
- // Inherited methods from OperationScaffolder
- public string getDescription()
- public OperationScaffolder setDescription()
- public static string|null getClassFromIdentifier()
- public static string|null getIdentifier()
- public static array getOperations()
- public void __construct()
- public $this addArgs()
- public $this addArg()
- public $this setArgDescriptions()
- public $this setArgDescription()
- public $this setArgDefaults()
- public $this setArgDefault()
- public $this setArgsRequired()
- public OperationScaffolder setArgRequired()
- public string getName()
- public $this setName()
- public ArrayList getArgs()
- public $this setTypeName()
- public string getTypeName()
- public $this removeArg()
- public $this removeArgs()
- public callable|OperationResolver getResolver()
- public $this setResolver()
- public $this applyConfig()
- protected callable createResolverFunction()
- protected array createDefaultArgs()
- protected array createArgs()
- // Inherited methods from Chainable
- public $this setChainableParent()
- public DataObjectScaffolder|SchemaScaffolder end()
- // Inherited methods from DataObjectTypeTrait
- public string getDataObjectClass()
- protected string typeName()
- public DataObject getDataObjectInstance()
- public $this setDataObjectClass()
Hierarchy
Extends
Implements
Tasks
Line | Task |
---|---|
117 | this is totally half baked |
Members
protected
- $args
—
array
List of argument scaffolders - $chainableParent — SilverStripe\GraphQL\Scaffolding\Traits\DataObjectScaffolder|SchemaScaffolder
- $description — string
Methods
private
protected
public
- __construct() — Create constructor.
- addToManager()
- getName()
- resolve()
Inherited from SilverStripe\GraphQL\Scaffolding\Scaffolders\MutationScaffolder
protected
- getType() — Get the type from Manager
public
Inherited from SilverStripe\GraphQL\Scaffolding\Scaffolders\OperationScaffolder
protected
- createArgs() — Parses the args to proper graphql-php spec.
- createDefaultArgs() — Helper for scaffolding args that require more work than ArgumentScaffolder::toArray()
- createResolverFunction() — Based on the type of resolver, create a function that invokes it.
public
- addArg()
- addArgs() — Adds args to the operation
- applyConfig()
- getArgs()
- getClassFromIdentifier()
- getDescription()
- getIdentifier()
- getName()
- getOperations() — Gets a map of operation identifiers to their classes
- getResolver()
- getTypeName()
- removeArg()
- removeArgs()
- setArgDefault() — Sets a default for a single arg
- setArgDefaults() — Sets argument defaults [ 'Featured' => true ]
- setArgDescription() — Sets a single arg description
- setArgDescriptions() — Sets descriptions of arguments [ 'Email' => 'The email of the user' ]
- setArgRequired() — Sets an operation argument as required or not
- setArgsRequired() — Sets operation arguments as required or not [ 'ID' => true ]
- setDescription()
- setName()
- setResolver()
- setTypeName() — Type name
Inherited from SilverStripe\GraphQL\Scaffolding\Traits\Chainable
public
- end()
- setChainableParent() — Set parent
Inherited from SilverStripe\GraphQL\Scaffolding\Traits\DataObjectTypeTrait
protected
- typeName() — Type name inferred from the dataobject.
public
- getDataObjectClass()
- getDataObjectInstance()
- setDataObjectClass() — Sets the DataObject name