|
@@ -19,7 +19,7 @@ import {
|
|
|
CUSTOMER_REGISTRATION,
|
|
CUSTOMER_REGISTRATION,
|
|
|
FORGET_PASSWORD,
|
|
FORGET_PASSWORD,
|
|
|
} from "@/graphql/customer/mutations";
|
|
} from "@/graphql/customer/mutations";
|
|
|
-import { DocumentNode } from "graphql";
|
|
|
|
|
|
|
+import { print, DocumentNode } from "graphql";
|
|
|
import {
|
|
import {
|
|
|
GRAPHQL_URL,
|
|
GRAPHQL_URL,
|
|
|
REST_API_URL,
|
|
REST_API_URL,
|
|
@@ -172,12 +172,12 @@ export async function serverGraphqlFetch<
|
|
|
TData,
|
|
TData,
|
|
|
TVariables = Record<string, never>
|
|
TVariables = Record<string, never>
|
|
|
>({
|
|
>({
|
|
|
- cache = "force-cache",
|
|
|
|
|
|
|
+ cache = "no-store",
|
|
|
headers,
|
|
headers,
|
|
|
query,
|
|
query,
|
|
|
tags,
|
|
tags,
|
|
|
variables,
|
|
variables,
|
|
|
- revalidate = 60,
|
|
|
|
|
|
|
+ revalidate = 0,
|
|
|
operationName = ''
|
|
operationName = ''
|
|
|
}: {
|
|
}: {
|
|
|
cache?: RequestCache;
|
|
cache?: RequestCache;
|
|
@@ -189,7 +189,7 @@ export async function serverGraphqlFetch<
|
|
|
operationName?: string;
|
|
operationName?: string;
|
|
|
}): Promise<FetchGraphqlResult<TData>> {
|
|
}): Promise<FetchGraphqlResult<TData>> {
|
|
|
try {
|
|
try {
|
|
|
- const queryString = typeof query === "string" ? query : (query.loc?.source?.body ?? "");
|
|
|
|
|
|
|
+ const queryString = typeof query === "string" ? query : print(query);
|
|
|
|
|
|
|
|
let accessToken: string | undefined = undefined;
|
|
let accessToken: string | undefined = undefined;
|
|
|
let guestToken: string | undefined = undefined;
|
|
let guestToken: string | undefined = undefined;
|
|
@@ -284,7 +284,7 @@ export async function bagistoFetch<T>({
|
|
|
}): Promise<{ status: number; body: T } | never> {
|
|
}): Promise<{ status: number; body: T } | never> {
|
|
|
try {
|
|
try {
|
|
|
const queryString =
|
|
const queryString =
|
|
|
- typeof query === "string" ? query : (query.loc?.source?.body ?? "");
|
|
|
|
|
|
|
+ typeof query === "string" ? query : print(query);
|
|
|
|
|
|
|
|
let bagistoCartId = "";
|
|
let bagistoCartId = "";
|
|
|
let accessToken: string | undefined = undefined;
|
|
let accessToken: string | undefined = undefined;
|