-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Aggregations section in GraphQL API documentation #2810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
meganelacheny
commented
Nov 13, 2025
- Addition of an "Aggregation" section in main GraphQL API page
- Addition on an aggregation example in GraphQL - Advanced Queries page
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a beautiful PR, Mégane, thank you! #chefkiss
The only minor comment I have is that I think the {#aggregations} part that follows the header on line 428 of graphql.md is unnecessary 😊
## My title {#my-custom-heading-title} is the format for custom heading ids that we sometime use when we want to manually define a precise heading link. This is useful for instance when we add badges to titles, to ensure the badge text is not part of the anchor link.
Here, since the ## Aggregations h2 and its custom heading {#aggregations} are strictly identical, I suggest we remove it; Docusaurus will properly generate a /cms/api/graphql#aggregations anchor automatically 🤓
docusaurus/docs/cms/api/graphql.md
Outdated
| ::: | ||
| :::info Performance & limits | ||
| Aggregations operate server-side, so they are generally faster than downloading and processing large result sets on the client. However, complex `groupBy` trees and wide projections can still be expensive. Use filters to restrict the data set and consider enabling [query depth or amount limits](/cms/plugins/graphql#rate-limiting-and-query-depth) to protect your API. Errors such as `You are not allowed to perform this action` usually mean the requester lacks the `Read` permission on the target collection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and I've just noticed this 👀
Suggestion to replace the link by a sentence about depthLimit and amountLimit.
The rate-limiting-and-query-depth section does not exist in our docs 😅 causing the build to fail (broken anchor link)
| Aggregations operate server-side, so they are generally faster than downloading and processing large result sets on the client. However, complex `groupBy` trees and wide projections can still be expensive. Use filters to restrict the data set and consider enabling [query depth or amount limits](/cms/plugins/graphql#rate-limiting-and-query-depth) to protect your API. Errors such as `You are not allowed to perform this action` usually mean the requester lacks the `Read` permission on the target collection. | |
| Aggregations operate server-side, so they are generally faster than downloading and processing large result sets on the client. However, complex `groupBy` trees and wide projections can still be expensive. Use filters to restrict the data set and consider setting up `depthLimit` and `amountLimit` values accordingly (see [#available-options](#available-options)) to protect your API. Errors such as `You are not allowed to perform this action` usually mean the requester lacks the `Read` permission on the target collection. |
Information from Kapa since I didn't know whether we had query limiting options for GQL in Strapi 😅

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah oops, well spotted 🙈 Thank you for the proposition to fix that mistake!
* Add aggregations section in GraphQL API docs * Add section in GraphQL advanced queries * Fix mistakes * Fix inexistent anchor link/wrong page link --------- Co-authored-by: Pierre Wizla <pwizla+github@gmail.com>