Skip to main content
Solid Relay

Function: createPreloadedQuery()

createPreloadedQuery<TQuery>(query, preloadedQuery): DataStore<TQuery["response"]>

Defined in: index.d.mts:215

Consumes a PreloadedQuery reference and returns reactive query data.

When the provided reference changes, the previous one is disposed automatically.

Type Parameters

TQuery

TQuery extends OperationType

Parameters

query

GraphQLTaggedNode

GraphQL query document matching the preloaded reference.

preloadedQuery

MaybeAccessor<MaybePromise<PreloadedQuery<TQuery>>>

Query reference (or promise/accessor resolving to one).

Returns

DataStore<TQuery["response"]>

A DataStore containing the query data state.

Last updated: 3/5/26, 7:43 PM

Edit this page on GitHub
Solid RelaySolidJS Bindings for Relay
Community
github