Skip to content
Snippets Groups Projects

Issue #3484236 Support page and items_per_page parameters.

Open - Snow requested to merge issue/graphql_core_schema-3484236:1.0.x into 1.0.x
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
@@ -187,6 +187,9 @@ class ViewExecutor extends DataProducerPluginBase implements ContainerFactoryPlu
public function resolve(ViewExecutable $executable, $page, $limit, $sortBy, $sortOrder, ?array $contextualFilters = [], ?array $filters = [], ?array $queryParams = []) {
$page = $page ?? 0;
if (!empty($queryParams['page'])) {
$page = $queryParams['page'];
}
if (!empty($queryParams['items_per_page'])) {
$limit = $queryParams['items_per_page'];
}
$url = $executable->hasUrl() ? $executable->getUrl() : Url::fromRoute('<front>');
Loading