Changing the size limit for returning nested documents

The default maximum number of documents returned for a graphql query is 50.

The default can be overridden using the _size argument like so:

      `{ 
          allEmojiSets(_size:50000) {
                     data {
                            _id
                            name
                            sort
                            queries
                            note
                            published
                            emojis {
                                _id
                                name
                                count
                                emoji
                                var
                        }
                    }
                }
            }`

In the above query I get back a maximum of 50000 EmojiSets. However, on the returned nested Emojis are stil limited to just 50 documents.

Edit:

So I’d like to be able to use something like this in my query:

`{ 
          allEmojiSets(_size:50000) {
                     data {
                            _id
                            name
                            sort
                            queries
                            note
                            published
                            emojis(_size:50000) {
                                _id
                                name
                                count
                                emoji
                                var
                        }
                    }
                }
            }`

How do I get an unlimited number of results for the nested document?

Originally posted to the faunadb slack and helped out by @Luigi_Servini, reposted here to help other users

Hi @ShadowfaxRodeo,

You cannot get an unlimited number of results, since the pagination limitin Fauna is 100,000 documents. Over that limit, you have to paginate over the cursor.

Hope this helps.

Luigi

Hi @Luigi_Servini, I guess i didn’t really mean unlimited, in my use case I’ll definitely not go above 100,000.

I just want to be able to go above the limit of 50. But the GraphQL query I’ve written above isn’t valid. It still lets me get a huge number of Emoji Sets, but only 50 emojis. Thanks again for your help. I may have found a solution using FQL, but would still rather use graphql if possible.

Once i’ve ironed out the FQL solution, I’ll post it here.