chore: lint fix

This commit is contained in:
Michael Zetterberg
2024-04-22 06:58:50 +02:00
parent abdc48f57f
commit 14e93eba7c
82 changed files with 282 additions and 160 deletions

View File

@@ -1,9 +1,11 @@
import "server-only"
import { request } from "./request"
import type { Data } from "@/types/request"
import type { BatchRequestDocument } from "graphql-request"
import type { Data } from "@/types/request"
export async function batchRequest<T>(
queries: (BatchRequestDocument & NextFetchRequestConfig)[]
): Promise<Data<T>> {

View File

@@ -1,11 +1,13 @@
import "server-only"
import ContentstackLivePreview from "@contentstack/live-preview-utils"
import { request as graphqlRequest } from "graphql-request"
import { env } from "@/env/server"
import ContentstackLivePreview from "@contentstack/live-preview-utils"
import type { DocumentNode } from "graphql"
import type { Data } from "@/types/request"
import type { DocumentNode } from "graphql"
export async function previewRequest<T>(
query: string | DocumentNode,

View File

@@ -1,11 +1,14 @@
import "server-only"
import { GraphQLClient } from "graphql-request"
import { env } from "@/env/server"
import { cache } from "react"
import type { Data } from "@/types/request"
import { env } from "@/env/server"
import type { DocumentNode } from "graphql"
import type { Data } from "@/types/request"
const client = new GraphQLClient(env.CMS_URL, {
fetch: cache(async function (
url: URL | RequestInfo,