Resolves the result of a query without registering a lasting subscriber.
This function fetches the result of a GROQ query and returns a promise that resolves with the query result.
It registers a temporary subscriber for the lifetime of the resolution (released shortly after the promise
settles), so the query state participates in normal cleanup even when no lasting subscriber ever attaches —
e.g. when a suspended component errors before committing. This makes it ideal for use with React Suspense,
where the returned promise is thrown to delay rendering until the query result becomes available.
Once the promise resolves, it is expected that a real subscriber will be added via getQueryState to manage ongoing updates.
Additionally, an optional AbortSignal can be provided to cancel the query and immediately clear the associated state
if there are no other active subscribers.
Resolves the result of a query without registering a lasting subscriber.
This function fetches the result of a GROQ query and returns a promise that resolves with the query result. It registers a temporary subscriber for the lifetime of the resolution (released shortly after the promise settles), so the query state participates in normal cleanup even when no lasting subscriber ever attaches — e.g. when a suspended component errors before committing. This makes it ideal for use with React Suspense, where the returned promise is thrown to delay rendering until the query result becomes available. Once the promise resolves, it is expected that a real subscriber will be added via
getQueryStateto manage ongoing updates.Additionally, an optional AbortSignal can be provided to cancel the query and immediately clear the associated state if there are no other active subscribers.