SilverStripe\GraphQL\Scaffolding\Scaffolders\ListQueryScaffolder
Scaffolds a GraphQL query field.
Synopsis
class ListQueryScaffolder
extends QueryScaffolder
{
- // members
- protected bool $usePagination = true;
- protected integer $defaultLimit = 100;
- protected integer $maximumLimit = 100;
- protected array $sortableFields = ;
- protected PaginationScaffolder $paginationScaffolder;
- // Inherited members from QueryScaffolder
- protected bool $isNested;
- // Inherited members from OperationScaffolder
- protected array $args;
- protected $description;
- // methods
- public $this setUsePagination()
- public int getPaginationLimit()
- public $this setPaginationLimit()
- public int getMaximumPaginationLimit()
- public $this setMaximumPaginationLimit()
- public $this addSortableFields()
- public array getSortableFields()
- public $this applyConfig()
- public void addToManager()
- public array scaffold()
- protected Connection createConnection()
- protected Closure createResolverFunction()
- protected PaginationScaffolder getPaginationScaffolder()
- // Inherited methods from QueryScaffolder
- public void __construct()
- public void addToManager()
- public $this setNested()
- 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()
- // Inherited methods from PermissionCheckerAware
- public $this setPermissionChecker()
- public QueryPermissionChecker getPermissionChecker()
Hierarchy
Extends
Uses
Members
protected
- $args
—
array
List of argument scaffolders - $chainableParent — SilverStripe\GraphQL\Scaffolding\Traits\DataObjectScaffolder|SchemaScaffolder
- $defaultLimit — int
- $description — string
- $isNested — SilverStripe\GraphQL\Scaffolding\Scaffolders\bool
- $maximumLimit — int
- $paginationScaffolder — SilverStripe\GraphQL\Scaffolding\Scaffolders\PaginationScaffolder
- $permissionChecker — SilverStripe\GraphQL\Permission\QueryPermissionChecker
- $sortableFields — array
- $usePagination — SilverStripe\GraphQL\Scaffolding\Scaffolders\bool
Methods
protected
- createConnection() — Creates a Connection for pagination.
- createResolverFunction()
- getPaginationScaffolder()
public
- addSortableFields()
- addToManager()
- applyConfig()
- getMaximumPaginationLimit()
- getPaginationLimit()
- getSortableFields()
- scaffold()
- setMaximumPaginationLimit()
- setPaginationLimit()
- setUsePagination()
Inherited from SilverStripe\GraphQL\Scaffolding\Scaffolders\QueryScaffolder
protected
- getType() — Get the type from Manager
public
- addToManager()
- getTypeName()
- setNested() — Set to true if this query is a nested field and should not appear in the root query field
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