MCPcopy Create free account
hub / github.com/HuolalaTech/react-query-kit / getFetchOptions

Function getFetchOptions

src/createBaseQuery.ts:59–70  ·  view source on GitHub ↗
(variables: any)

Source from the content-addressed store, hash-verified

57 }
58
59 const getFetchOptions = (variables: any) => {
60 const { queryKeyHashFn, staleTime, gcTime } = defaultOptions
61 return {
62 ...getQueryOptions(defaultOptions.fetcher, variables),
63 ...(queryKeyHashFn !== undefined && { queryKeyHashFn }),
64 getPreviousPageParam: defaultOptions.getPreviousPageParam,
65 getNextPageParam: defaultOptions.getNextPageParam,
66 initialPageParam: defaultOptions.initialPageParam,
67 ...(staleTime !== undefined && { staleTime }),
68 ...(gcTime !== undefined && { gcTime }),
69 }
70 }
71
72 const useBaseHook = (
73 options: QueryBaseHookOptions,

Callers

nothing calls this directly

Calls 1

getQueryOptionsFunction · 0.85

Tested by

no test coverage detected