createQuery

Function: createQuery()

createQuery(options, queryClient)

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

Type Parameters

TQueryFnData = unknown

TError = Error

TData = TQueryFnData

TQueryKey extends QueryKey = QueryKey

Parameters

options: StoreOrVal<DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?: QueryClient

Returns

DefinedCreateQueryResult<TData, TError>

Defined in

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

createQuery(options, queryClient)

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

Type Parameters

TQueryFnData = unknown

TError = Error

TData = TQueryFnData

TQueryKey extends QueryKey = QueryKey

Parameters

options: StoreOrVal<UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?: QueryClient

Returns

CreateQueryResult<TData, TError>

Defined in

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

createQuery(options, queryClient)

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

Type Parameters

TQueryFnData = unknown

TError = Error

TData = TQueryFnData

TQueryKey extends QueryKey = QueryKey

Parameters

options: StoreOrVal<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>>

queryClient?: QueryClient

Returns

CreateQueryResult<TData, TError>

Defined in

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