How to Paginate result of a Filter that doesn't uses Index

Using a graphql paginated resolver I would like to return something similar to @databrecht solution in sql-group-by-having-counterpart-in-faunadb where he gets a Filter to work using Count, but the result is an Array instead of a Set, so I can’t use Paginate to return the results in the paginated resolver.

I wonder if I need to convert the results into a Set. But how would I do that? I can get an array of Refs from the results but then how to make it Paginate friendly?

Hi Jorge,

Can you share some more details about the resolver you’re working with? For instance, what are the results it’s returning, and what are you trying to do with those results exactly?

You’re right that Paginate works on sets and not arrays. And there’s not a way to cast an array as a set. But there are other functions that do work on arrays, so depending on what you’re trying to do with the data there’s probably a function that will accomplish that for you. We just need some more detail to find the right one.

Cory