Merged in revert-gql (pull request #3104)

Revert gql

* Revert "Merged in fix/system-fragment (pull request #3102)"

This reverts commit 0d479eb337.

* Revert "Merged in chore/replace-graphql-tag/loader (pull request #3096)"

This reverts commit e9bd159e98.
This commit is contained in:
Linus Flood
2025-11-07 13:13:28 +00:00
parent cab85f3ffd
commit 5770dcdd9c
291 changed files with 8000 additions and 11733 deletions

View File

@@ -1,5 +1,4 @@
import fetchRetry from "fetch-retry"
import { type DocumentNode, print } from "graphql"
import { GraphQLClient } from "graphql-request"
import stringify from "json-stable-stringify-without-jsonify"
import { cache as reactCache } from "react"
@@ -15,6 +14,8 @@ import { getPreviewHash, isPreviewByUid } from "../previewContext"
import { request as _request } from "./_request"
import { getOperationName } from "./getOperationName"
import type { DocumentNode } from "graphql"
import type { Data } from "../types/requestData"
export async function request<T>(
@@ -44,7 +45,7 @@ export async function request<T>(
return doCall()
}
const queryString = typeof query === "string" ? query : print(query)
const queryString = typeof query === "string" ? query : stringify(query)
const variablesString = stringify(variables)
const fullQuery = `${queryString}${variablesString}`