MCPcopy Create free account
hub / github.com/SvelteStack/svelte-query / setOptions

Method setOptions

src/queryCore/core/query.ts:183–195  ·  view source on GitHub ↗
(
    options?: QueryOptions<TQueryFnData, TError, TData, TQueryKey>
  )

Source from the content-addressed store, hash-verified

181 }
182
183 private setOptions(
184 options?: QueryOptions<TQueryFnData, TError, TData, TQueryKey>
185 ): void {
186 this.options = { ...this.defaultOptions, ...options }
187
188 this.meta = options?.meta
189
190 // Default to 5 minutes if not cache time is set
191 this.cacheTime = Math.max(
192 this.cacheTime || 0,
193 this.options.cacheTime ?? 5 * 60 * 1000
194 )
195 }
196
197 setDefaultOptions(
198 options: QueryOptions<TQueryFnData, TError, TData, TQueryKey>

Callers 6

constructorMethod · 0.95
fetchMethod · 0.95
updateObserversMethod · 0.45
setOptionsFunction · 0.45
setOptionsFunction · 0.45
setOptionsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected