chore: run prettier --write .
This commit is contained in:
@@ -11,4 +11,4 @@ fragment ContactAside on CurrentBlocksPageAsideContact {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ fragment PuffAside on CurrentBlocksPageAsidePuff {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ fragment PuffBlock on CurrentBlocksPageBlocksPuffs {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ fragment Contact on ContactBlock {
|
||||
street
|
||||
zip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@ fragment Puff on Puff {
|
||||
}
|
||||
}
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import "server-only";
|
||||
import { request as graphqlRequest } from "graphql-request";
|
||||
import "server-only"
|
||||
import { request as graphqlRequest } from "graphql-request"
|
||||
|
||||
import { env } from "@/env/server";
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { Data } from "@/types/request";
|
||||
import type { DocumentNode } from "graphql";
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils";
|
||||
import type { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
|
||||
export async function previewRequest<T>(
|
||||
query: string | DocumentNode,
|
||||
@@ -33,7 +33,7 @@ export async function previewRequest<T>(
|
||||
|
||||
return { data: response }
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
throw new Error("Something went wrong");
|
||||
console.error(error)
|
||||
throw new Error("Something went wrong")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import { env } from "@/env/server"
|
||||
import type { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
|
||||
export async function request<T>(query: string | DocumentNode, variables?: {}): Promise<Data<T>> {
|
||||
export async function request<T>(
|
||||
query: string | DocumentNode,
|
||||
variables?: {}
|
||||
): Promise<Data<T>> {
|
||||
try {
|
||||
if (env.PRINT_QUERY) {
|
||||
const graphqlRawRequest = (await import("graphql-request")).rawRequest
|
||||
|
||||
Reference in New Issue
Block a user