Skip to content

Commit cc328ed

Browse files
refactor (QueryClient): remove getQueriesData batching
the batching is only necessary in setQueriesData because setQueryData is called under the hood therefore, it is not needed here.
1 parent 3ff6ee7 commit cc328ed

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/core/queryClient.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,12 @@ export class QueryClient {
116116
getQueriesData<TData = unknown>(
117117
queryKeyOrFilters: QueryKey | QueryFilters
118118
): [QueryKey, TData][] {
119-
return notifyManager.batch(() =>
120-
this.getQueryCache()
121-
.findAll(queryKeyOrFilters)
122-
.map(({ queryKey, state }) => {
123-
const data = state.data as TData
124-
return [queryKey, data]
125-
})
126-
)
119+
return this.getQueryCache()
120+
.findAll(queryKeyOrFilters)
121+
.map(({ queryKey, state }) => {
122+
const data = state.data as TData
123+
return [queryKey, data]
124+
})
127125
}
128126

129127
setQueryData<TData>(

0 commit comments

Comments
 (0)