List all collections
Solution
Use the Collections
function combined with the Paginate
function:
{
data: [
Collection("Letters"),
Collection("People"),
Collection("characters"),
Collection("customers"),
Collection("decrepit_huts"),
Collection("magical_creatures"),
Collection("orders"),
Collection("posts"),
Collection("products"),
Collection("spellbooks"),
Collection("spells"),
Collection("stores"),
Collection("users"),
Collection("huts")
]
}
Discussion
The Paginate
function defaults to returning up to 64 collections per
page. If your database contains more than 64 collections, you can use the
size
parameter to retrieve up to 100,000 collections at once.
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!