public function args()
    {
        $existing = is_callable($this->args) ? call_user_func($this->args) : $this->args;

        if (!is_array($existing)) {
            $existing = [];
        }

        $args = array_merge($existing, [
            'limit' => [
                'type' => Type::int(),
            ],
            'offset' => [
                'type' => Type::int()
            ]
        ]);

        if ($fields = $this->getSortableFields()) {
            $args['sortBy'] = [
                'type' => Type::listOf(
                    Injector::inst()->create(SortInputTypeCreator::class, $this->connectionName)
                        ->setSortableFields($fields)
                        ->toType()
                )
            ];
        }

        return $args;
    }
public function args()
    {
        $existing = is_callable($this->args) ? call_user_func($this->args) : $this->args;

        if (!is_array($existing)) {
            $existing = [];
        }

        $args = array_merge($existing, [
            'limit' => [
                'type' => Type::int(),
            ],
            'offset' => [
                'type' => Type::int()
            ]
        ]);

        if ($fields = $this->getSortableFields()) {
            $args['sortBy'] = [
                'type' => Type::listOf(
                    Injector::inst()->create(SortInputTypeCreator::class, $this->connectionName)
                        ->setSortableFields($fields)
                        ->toType()
                )
            ];
        }

        return $args;
    }
public function args ( ) { $ existing = is_callable ( $ this -> args ) ? call_user_func ( $ this -> args ) : $ this -> args ; if ( ! is_array ( $ existing ) ) { $ existing = [ ] ; } $ args = array_merge ( $ existing , [ 'limit' => [ 'type' => Type :: int ( ) , ] , 'offset' => [ 'type' => Type :: int ( ) ] ] ) ; if ( $ fields = $ this -> getSortableFields ( ) ) { $ args [ 'sortBy' ] = [ 'type' => Type :: listOf ( Injector :: inst ( ) -> create ( SortInputTypeCreator :: class , $ this -> connectionName ) -> setSortableFields ( $ fields ) -> toType ( ) ) ] ; } return $ args ; }
Pagination support for the connection type. Currently doesn't support
cursors, just basic offset pagination.

@return array
Pagination support for the connection type . Currently doesn t support cursors just basic offset pagination .