fix: rename retried-wrapped fetch to make caching work again
This commit is contained in:
@@ -7,12 +7,12 @@ import type { BatchRequestDocument } from "graphql-request"
|
||||
import type { Data } from "@/types/request"
|
||||
|
||||
export async function batchRequest<T>(
|
||||
queries: (BatchRequestDocument & NextFetchRequestConfig)[]
|
||||
queries: (BatchRequestDocument & { options?: RequestInit })[]
|
||||
): Promise<Data<T>> {
|
||||
try {
|
||||
const response = await Promise.allSettled(
|
||||
queries.map((query) =>
|
||||
request<T>(query.document, query.variables, { tags: query.tags })
|
||||
request<T>(query.document, query.variables, query.options)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user