Skip to content

Posts are limited to 10 when we call it by Category List #6

@zexperto

Description

@zexperto

when you use the query "mpBlogCategories" and we query the posts, the number of posts we are getting is only 10, you can check this class
Class: \Mageplaza\BlogGraphQl\Model\Resolver\Resolver\Post:: resolve

public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)
{
$category = $value['model'];
$postCollection = $category->getSelectedPostsCollection();
$searchCriteria = $this->searchCriteriaBuilder->build('posts', $args);
$searchCriteria->setCurrentPage(1);
$searchCriteria->setPageSize(10);
$searchResult = $this->filterQuery->getResult($searchCriteria, 'post', $postCollection);

return [
    'total_count' => $searchResult->getTotalCount(),
    'items'       => $searchResult->getItemsSearchResult()
]

}

I believe we should get all or we use PageSize

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions