How does one get all the documents of a collection in FaunaDB?

583 views Asked by At

I have tried q.Match('fooIndex'), where fooIndex is an index without field, but it returns a weird object which is not a list of documents

1

There are 1 answers

0
Jay On BEST ANSWER

Match('fooIndex') returns a SetRef. You would have to Map,Paginate the result SetRef and pass to a Lambda to Get the documents.

This should do to get 100 documents.

Map(Paginate(Match('fooIndex'),{size:100}),Lambda("x",Get(Var("x"))))