Skip to main content
Solid Relay

Function: createQueryLoader()

createQueryLoader<TQuery>(preloadableRequest, initialQueryReference?): [Accessor<PreloadedQuery<TQuery> | null | undefined>, (variables, options?) => void, DisposeFn]

Defined in: index.d.mts:230

Creates imperative helpers for preloading queries.

Returns a tuple:

  • an accessor for the current PreloadedQuery reference
  • a loadQuery function to start loading with variables
  • a disposeQuery function to clear and dispose the current reference

Type Parameters

TQuery

TQuery extends OperationType

Parameters

preloadableRequest

Query document or preloadable concrete request.

GraphQLTaggedNode | PreloadableConcreteRequest<TQuery>

initialQueryReference?

Optional initial query reference.

PreloadedQuery<TQuery> | null

Returns

[Accessor<PreloadedQuery<TQuery> | null | undefined>, (variables, options?) => void, DisposeFn]

[queryRef, loadQuery, disposeQuery].

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

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