createQuery

Function: createQuery()

Call Signature

ts
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): CreateQueryResult<TData, TError>;
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): CreateQueryResult<TData, TError>;

Defined in: packages/svelte-query/src/createQuery.ts:15

Type Parameters

TQueryFnData

TQueryFnData = unknown

TError

TError = Error

TData

TData = TQueryFnData

TQueryKey

TQueryKey extends readonly unknown[] = readonly unknown[]

Parameters

options

Accessor<UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?

Accessor<QueryClient>

Returns

CreateQueryResult<TData, TError>

Call Signature

ts
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): DefinedCreateQueryResult<TData, TError>;
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): DefinedCreateQueryResult<TData, TError>;

Defined in: packages/svelte-query/src/createQuery.ts:27

Type Parameters

TQueryFnData

TQueryFnData = unknown

TError

TError = Error

TData

TData = TQueryFnData

TQueryKey

TQueryKey extends readonly unknown[] = readonly unknown[]

Parameters

options

Accessor<DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?

Accessor<QueryClient>

Returns

DefinedCreateQueryResult<TData, TError>

Call Signature

ts
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): CreateQueryResult<TData, TError>;
function createQuery<TQueryFnData, TError, TData, TQueryKey>(options, queryClient?): CreateQueryResult<TData, TError>;

Defined in: packages/svelte-query/src/createQuery.ts:39

Type Parameters

TQueryFnData

TQueryFnData

TError

TError = Error

TData

TData = TQueryFnData

TQueryKey

TQueryKey extends readonly unknown[] = readonly unknown[]

Parameters

options

Accessor<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?

Accessor<QueryClient>

Returns

CreateQueryResult<TData, TError>