-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
I was using Query to get content from contentful. Documentation says setLimit can be set between 1 and 1000, and to set null to reset it (which I believe makes it not to limit, or limit it to maximum which is 1000). however, in our case, when we didn't use setLimit on the query, it was always returning 100 results. When added ->setLimit() or ->setLimit(null), hoping it would not set any limit or return the maximum limit, it didn't work either.
If you have default limit set to 100, please update it in the docs. Also looks like resetting it with null is not working as well, unless I'm doing it wrong (then please let me know how to remove limit from the query). Thanks.
code snippet below (I am using client with preview):
use Contentful\Delivery\Client;
use Contentful\Delivery\Query;
...
$query = new Query();
$query->setContentType(self::CONTENTFUL_TYPE_TRANSLATION)
->orderBy('-sys.createdAt')
->setLimit(1000)//by default query pulling 100 entries
->setInclude(1);
try {
$entries = $this->client->getEntries($query);
} catch (...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels