# Allow query depth \> 9

**URL:** <https://community.prismic.io/t/allow-query-depth-9/3846>\
**Category:** Developing with Prismic\
**Tags:** product-feature-idea, graphql\
**Created:** [February 2, 2021, 8:10pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846 "2021-02-02T20:10:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob](https://community.prismic.io/u/rob)\
**Post date:** [February 2, 2021, 8:10pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/1 "2021-02-02T20:10:50Z")

</div>

Nine sounds generous on the face of it, but with all of the wrapping and grouping Prismic enforces it's actually not possible to query a scalar field on the fourth level of nesting, if the root is an `all*` query.

I'm trying to build a directory page showing all of the lessons available on an educational site. I have category -\< course -\< module -\< unit. We have fewer than 100 units in total so displaying them all isn't unreasonable in one page and one query, but in graphql following Prismic's recommendation, a unit title's graphql path is:

allCategorys -\> edges -\> node -\> courses -\> course -\> modules -\> module -\> units -\> unit -\> title

That's a query depth of 10, so the query fails. I'm still going to build this page, but I'm now going to have to split the query depth-wise and make more calls, which is inefficient for me and more costly for Prismic.

Would it be possible to reconsider this depth limit? Is a four level hierarchy really too much?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [February 2, 2021, 9:13pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/2 "2021-02-02T21:13:38Z")

</div>

Hey Rob, thanks for reaching out.

Yes, this is still the way the GraphQL schema in Prismic works. The limit is there in order to protect us from doing too many requests on our side.

So at the moment we are not considering to increase the depth limit of the queries. As you may have guessed, to solve your issue right now, the solution is to split the query into two.

What I can do is mark your thread as an open feature request so we can be aware of it in the future.

Thanks  
Paulina.

---

<div class="post-metadata">

**Author:** ![rob](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob](https://community.prismic.io/u/rob)\
**Post date:** [February 2, 2021, 9:29pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/4 "2021-02-02T21:29:02Z")

</div>

I appreciate that’s the reason, but it’s misguided and essentially a false economy. It’d be cheaper for Prismic if I could do this in one request rather than making many requests to get the same information, and a better user experience to boot. Another +1 in the GraphCMS column I’m afraid.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [February 2, 2021, 9:34pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/5 "2021-02-02T21:34:09Z")

</div>

I understand, from that point of view, it is true that it would be useful to have more flexibility within the queries.

We've had discussions about ideas of how to improve the structure of it, but again It’s not something that we have tracked as a future improvement at the moment.

In any case, thanks a lot for the feedback, I'll be sure to add your comments in the feat. request tracker.

---

<div class="post-metadata">

**Author:** ![rob](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob](https://community.prismic.io/u/rob)\
**Post date:** [February 3, 2021, 12:05am UTC](https://community.prismic.io/t/allow-query-depth-9/3846/6 "2021-02-03T00:05:26Z")

</div>

Thanks, appreciate the response.

Just a thought - A query complexity limit might be better all round than a depth limit - for example expanding `_meta` object counts against depth but presumably doesn’t increase the cost of servicing the request.

In any case, placing limits on queries to private (access controlled) endpoints serves no real purpose given prismic’s pricing model - it just persuades customers to use more requests, which is free albeit suboptimal for them, and obviously worse for Prismic. Any limits should be set such that a legitimate use case doesn’t hit them.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [February 9, 2021, 6:26pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/7 "2021-02-09T18:26:12Z")

</div>

This is being tracked as an open feature request.

If you have another use-case for this feature, you can ['Flag' this topic to reopen](https://community.prismic.io/t/re-open-a-thread/2175). Please use the ❤ button to show your support for the feature and check out our [Feature Request Guidelines](https://community.prismic.io/t/feature-requests-what-do-you-already-love-what-could-be-better/844).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:09pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/8 "2021-12-09T17:09:16Z")

</div>



---

<div class="post-metadata">

**Author:** ![jan.griffioen-jarfal](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jan.griffioen-jarfal/32/1989_2.png) [@jan.griffioen-jarfal](https://community.prismic.io/u/jan.griffioen-jarfal)\
**Post date:** [February 13, 2023, 2:46pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/9 "2023-02-13T14:46:41Z")

</div>

Is the query depth limit part of all your pricing plans? We are currently on a Platinum plan - can we pay to get rid of it?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [February 13, 2023, 6:20pm UTC](https://community.prismic.io/t/allow-query-depth-9/3846/11 "2023-02-13T18:20:04Z")

</div>

Hey @jan.griffioen-jarfal, it is the default functionality of the GraphQl schema. So it isn't connected to repository plans.
