SilverStripe\GraphQL\Scaffolding\Scaffolders\OperationScaffolder
Provides functionality common to both operation scaffolders. Cannot be a subclass due to their distinct inheritance chains.
Synopsis
class OperationScaffolder
implements
ConfigurationApplier
{
- // members
- private $typeName;
- private $operationName;
- private OperationResolver|callable $resolver;
- protected array $args = ;
- protected $description;
- // methods
- 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()
Hierarchy
Members
private
- $operationName
—
string
Name of operation - $resolver — SilverStripe\GraphQL\Scaffolding\Scaffolders\OperationResolver|callable
- $typeName
—
string
Type backing this operation
protected
- $args
—
array
List of argument scaffolders - $chainableParent — SilverStripe\GraphQL\Scaffolding\Traits\DataObjectScaffolder|SchemaScaffolder
- $description — string
Methods
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
- __construct() — OperationScaffolder constructor.
- 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