This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
How to output paging data? #391
Open
Description
PHP
class ProductsQuery extends Query
{
protected $attributes = [
'name' => 'Products Query'
];
public function type()
{
return GraphQL::pagination(
GraphQL::type('Product')
);
}
public function resolve($root, $args)
{
return app(ProductRepositoryInterface::class)
->paginate([
'per_page' => 6
]);
}
}
Query
{
products {
items {
name
str_id
description
}
}
}
Metadata
Metadata
Assignees
Labels
No labels