Function: loadQuery()
loadQuery<
TQuery>(environment,preloadableRequest,variables,options?):PreloadedQuery<TQuery>
Defined in: index.d.mts:61
Preloads a query and returns a PreloadedQuery reference.
Use this to start fetching before render (for example during route preload),
then consume the returned reference with createPreloadedQuery.
Type Parameters
TQuery
TQuery extends OperationType
Parameters
environment
Environment
Relay environment used to execute and retain the query.
preloadableRequest
Query document or preloadable concrete request.
GraphQLTaggedNode | PreloadableConcreteRequest<TQuery>
variables
VariablesOf<TQuery>
Variables for the query operation.
options?
Options for the preload request.
Returns
PreloadedQuery<TQuery>
A query reference that can be consumed by createPreloadedQuery.
Last updated: 3/5/26, 7:43 PM
Edit this page on GitHub