MCPcopy Index your code
hub / github.com/TanStack/query / useCustomQuery

Function useCustomQuery

packages/vue-query/src/__tests__/useQuery.test-d.ts:141–153  ·  view source on GitHub ↗
(
        options?: OmitKeyof<
          UseQueryOptions<string>,
          'queryKey' | 'queryFn',
          'safely'
        >,
      )

Source from the content-addressed store, hash-verified

139 describe('custom composable', () => {
140 it('should allow custom composable using UseQueryOptions', () => {
141 const useCustomQuery = (
142 options?: OmitKeyof<
143 UseQueryOptions<string>,
144 'queryKey' | 'queryFn',
145 'safely'
146 >,
147 ) => {
148 return useQuery({
149 ...options,
150 queryKey: ['todos-key'],
151 queryFn: () => Promise.resolve('data'),
152 })
153 }
154
155 const { data } = reactive(useCustomQuery())
156

Callers 1

useQuery.test-d.tsFile · 0.70

Calls 1

useQueryFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…