You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there! I’m currently working on a project that retrieves dozens of documents in one query. I noticed some warnings popping up when running the query. Here’s what they say:
I’ve replaced some characters with *** just to be cautious about any sensitive information and the query was a bit long.
There’s also a performance issue in draft mode whenever this query runs. It can take over ten seconds to load the page in draft mode, and sometimes it even causes an edge function crash error on Netlify where the project hosted.
However, after splitting the query into multiple ones, the warnings disappeared and the performance improved.
I suspect that the issue might be related to the revalidation tags used by next loader during a query, which seem to exceed the maximum allowed tags by Next.js when there are a lot of documents involved.
Describe the bug
Hey there! I’m currently working on a project that retrieves dozens of documents in one query. I noticed some warnings popping up when running the query. Here’s what they say:
I’ve replaced some characters with *** just to be cautious about any sensitive information and the query was a bit long.
There’s also a performance issue in draft mode whenever this query runs. It can take over ten seconds to load the page in draft mode, and sometimes it even causes an edge function crash error on Netlify where the project hosted.
However, after splitting the query into multiple ones, the warnings disappeared and the performance improved.
I suspect that the issue might be related to the revalidation tags used by next loader during a query, which seem to exceed the maximum allowed tags by Next.js when there are a lot of documents involved.
Which versions of Sanity are you using?
@sanity/cli (global) 3.63.0 (latest: 3.67.1)
@sanity/image-url 1.0.2 (latest: 1.1.0)
@sanity/language-filter 4.0.2 (up to date)
@sanity/orderable-document-list 1.2.2 (up to date)
@sanity/preview-url-secret 1.6.7 (latest: 2.0.5)
@sanity/types 3.62.2 (latest: 3.67.1)
@sanity/ui 2.8.10 (latest: 2.10.9)
@sanity/vision 3.37.2 (latest: 3.67.1)
@sanity/webhook 4.0.3 (latest: 4.0.4)
sanity 3.63.0 (latest: 3.67.1)
next-sanity 9.8.21
next 14.2.8
What operating system are you using?
mac os 14.5
Which versions of Node.js / npm are you running?
v20.18.0
The text was updated successfully, but these errors were encountered: