strapi-plugin-fuzzy-search icon indicating copy to clipboard operation
strapi-plugin-fuzzy-search copied to clipboard

Pagination -> total count Graphql

Open OstryakovN opened this issue 1 year ago • 1 comments

Hi!

Tell me why it shows the total number of records, and not the searched total number?

http://joxi.ru/823lvQ4TwgZlxA

In this example, there are only 15 entries in the strapi, but those that actually fall under the searched value are only 8 pieces. The value 15 goes to total. Is this not a bug?

OstryakovN avatar Jul 24 '23 14:07 OstryakovN

Hey @OstryakovN,

thanks for reporting this bug! I just had a look and indeed the graphql endpoint returns the wrong total count. I'm returning the correct number for the resolver in my code but it appears that Strapi does some sort of transformation to the response under the hood that overwrites the total key with the total number of records in the db for a content type.

I'll investigate this further and see what I can do.

DomDew avatar Jul 25 '23 06:07 DomDew