Nick Steele
Nick Steele

Reputation: 8027

FeathersJS seems to limit queries to 1000 even if you set $limit to above 1000

I've been using feathers a lot and love it, but I need to return over 1000 records for a special case. However, no matter what I do, Feathers returns a query resetting $limit to 1000, and only returns 1000 records.

I know it's getting my $limit conveyed, because if I set the limit to 1, 10, 500 or 999 it respects it, but if I set it to 1001 or anything higher, it only returns 1000.

I'm using feathers with MySQL and feathers-sequalize.

Upvotes: 6

Views: 3553

Answers (1)

Nick Steele
Nick Steele

Reputation: 8027

For anyone else having this problem, one of the creators of Feathers directed me here, which fixed the issue:

https://docs.feathersjs.com/api/databases/common.html#pagination

By default, Feathers limits service queries to 1000, even if you specify a $limit in your query afterwards.

To bypass this, just see the above doc which explains this: When creating the service, pass in a pagination object into your service options to set a default $limit to something other than 1000.

Upvotes: 8

Related Questions