{"version":3,"file":"graphql-request-B7avD3vo.js","sources":["../../node_modules/graphql-request/build/esm/defaultJsonSerializer.js","../../node_modules/graphql-request/build/esm/helpers.js","../../node_modules/graphql-request/build/esm/parseArgs.js","../../node_modules/graphql-request/build/esm/resolveRequestDocument.js","../../node_modules/graphql-request/build/esm/types.js","../../node_modules/graphql-request/build/esm/index.js"],"sourcesContent":["export const defaultJsonSerializer = JSON;\n//# sourceMappingURL=defaultJsonSerializer.js.map","export const uppercase = (str) => str.toUpperCase();\n/**\n * Convert Headers instance into regular object\n */\nexport const HeadersInstanceToPlainObject = (headers) => {\n const o = {};\n headers.forEach((v, k) => {\n o[k] = v;\n });\n return o;\n};\n//# sourceMappingURL=helpers.js.map","export const parseRequestArgs = (documentOrOptions, variables, requestHeaders) => {\n return documentOrOptions.document\n ? documentOrOptions\n : {\n document: documentOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {\n return queryOrOptions.query\n ? queryOrOptions\n : {\n query: queryOrOptions,\n variables: variables,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseBatchRequestArgs = (documentsOrOptions, requestHeaders) => {\n return documentsOrOptions.documents\n ? documentsOrOptions\n : {\n documents: documentsOrOptions,\n requestHeaders: requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRequestExtendedArgs = (urlOrOptions, document, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.document\n ? urlOrOptions\n : {\n url: urlOrOptions,\n document: document,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\nexport const parseRawRequestExtendedArgs = (urlOrOptions, query, ...variablesAndRequestHeaders) => {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n return urlOrOptions.query\n ? urlOrOptions\n : {\n url: urlOrOptions,\n query: query,\n variables,\n requestHeaders,\n signal: undefined,\n };\n};\n//# sourceMappingURL=parseArgs.js.map","import { parse, print } from 'graphql';\n/**\n * helpers\n */\nconst extractOperationName = (document) => {\n let operationName = undefined;\n const operationDefinitions = document.definitions.filter((definition) => definition.kind === `OperationDefinition`);\n if (operationDefinitions.length === 1) {\n operationName = operationDefinitions[0]?.name?.value;\n }\n return operationName;\n};\nexport const resolveRequestDocument = (document) => {\n if (typeof document === `string`) {\n let operationName = undefined;\n try {\n const parsedDocument = parse(document);\n operationName = extractOperationName(parsedDocument);\n }\n catch (err) {\n // Failed parsing the document, the operationName will be undefined\n }\n return { query: document, operationName };\n }\n const operationName = extractOperationName(document);\n return { query: print(document), operationName };\n};\n//# sourceMappingURL=resolveRequestDocument.js.map","export class ClientError extends Error {\n constructor(response, request) {\n const message = `${ClientError.extractMessage(response)}: ${JSON.stringify({\n response,\n request,\n })}`;\n super(message);\n Object.setPrototypeOf(this, ClientError.prototype);\n this.response = response;\n this.request = request;\n // this is needed as Safari doesn't support .captureStackTrace\n if (typeof Error.captureStackTrace === `function`) {\n Error.captureStackTrace(this, ClientError);\n }\n }\n static extractMessage(response) {\n return response.errors?.[0]?.message ?? `GraphQL Error (Code: ${response.status})`;\n }\n}\n//# sourceMappingURL=types.js.map","import { defaultJsonSerializer } from './defaultJsonSerializer.js';\nimport { HeadersInstanceToPlainObject, uppercase } from './helpers.js';\nimport { parseBatchRequestArgs, parseRawRequestArgs, parseRawRequestExtendedArgs, parseRequestArgs, parseRequestExtendedArgs, } from './parseArgs.js';\nimport { resolveRequestDocument } from './resolveRequestDocument.js';\nimport { ClientError, } from './types.js';\nimport crossFetch, * as CrossFetch from 'cross-fetch';\n/**\n * Convert the given headers configuration into a plain object.\n */\nconst resolveHeaders = (headers) => {\n let oHeaders = {};\n if (headers) {\n if ((typeof Headers !== `undefined` && headers instanceof Headers) ||\n (CrossFetch && CrossFetch.Headers && headers instanceof CrossFetch.Headers)) {\n oHeaders = HeadersInstanceToPlainObject(headers);\n }\n else if (Array.isArray(headers)) {\n headers.forEach(([name, value]) => {\n if (name && value !== undefined) {\n oHeaders[name] = value;\n }\n });\n }\n else {\n oHeaders = headers;\n }\n }\n return oHeaders;\n};\n/**\n * Clean a GraphQL document to send it via a GET query\n */\nconst cleanQuery = (str) => str.replace(/([\\s,]|#[^\\n\\r]+)+/g, ` `).trim();\n/**\n * Create query string for GraphQL request\n */\nconst buildRequestConfig = (params) => {\n if (!Array.isArray(params.query)) {\n const params_ = params;\n const search = [`query=${encodeURIComponent(cleanQuery(params_.query))}`];\n if (params.variables) {\n search.push(`variables=${encodeURIComponent(params_.jsonSerializer.stringify(params_.variables))}`);\n }\n if (params_.operationName) {\n search.push(`operationName=${encodeURIComponent(params_.operationName)}`);\n }\n return search.join(`&`);\n }\n if (typeof params.variables !== `undefined` && !Array.isArray(params.variables)) {\n throw new Error(`Cannot create query with given variable type, array expected`);\n }\n // Batch support\n const params_ = params;\n const payload = params.query.reduce((acc, currentQuery, index) => {\n acc.push({\n query: cleanQuery(currentQuery),\n variables: params_.variables ? params_.jsonSerializer.stringify(params_.variables[index]) : undefined,\n });\n return acc;\n }, []);\n return `query=${encodeURIComponent(params_.jsonSerializer.stringify(payload))}`;\n};\nconst createHttpMethodFetcher = (method) => async (params) => {\n const { url, query, variables, operationName, fetch, fetchOptions, middleware } = params;\n const headers = { ...params.headers };\n let queryParams = ``;\n let body = undefined;\n if (method === `POST`) {\n body = createRequestBody(query, variables, operationName, fetchOptions.jsonSerializer);\n if (typeof body === `string`) {\n // @ts-expect-error todo\n headers[`Content-Type`] = `application/json`;\n }\n }\n else {\n // @ts-expect-error todo needs ADT for TS to understand the different states\n queryParams = buildRequestConfig({\n query,\n variables,\n operationName,\n jsonSerializer: fetchOptions.jsonSerializer ?? defaultJsonSerializer,\n });\n }\n const init = {\n method,\n headers,\n body,\n ...fetchOptions,\n };\n let urlResolved = url;\n let initResolved = init;\n if (middleware) {\n const result = await Promise.resolve(middleware({ ...init, url, operationName, variables }));\n const { url: urlNew, ...initNew } = result;\n urlResolved = urlNew;\n initResolved = initNew;\n }\n if (queryParams) {\n urlResolved = `${urlResolved}?${queryParams}`;\n }\n return await fetch(urlResolved, initResolved);\n};\n/**\n * GraphQL Client.\n */\nclass GraphQLClient {\n constructor(url, requestConfig = {}) {\n this.url = url;\n this.requestConfig = requestConfig;\n /**\n * Send a GraphQL query to the server.\n */\n this.rawRequest = async (...args) => {\n const [queryOrOptions, variables, requestHeaders] = args;\n const rawRequestOptions = parseRawRequestArgs(queryOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (rawRequestOptions.signal !== undefined) {\n fetchOptions.signal = rawRequestOptions.signal;\n }\n const { operationName } = resolveRequestDocument(rawRequestOptions.query);\n return makeRequest({\n url,\n query: rawRequestOptions.query,\n variables: rawRequestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(rawRequestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n };\n }\n async request(documentOrOptions, ...variablesAndRequestHeaders) {\n const [variables, requestHeaders] = variablesAndRequestHeaders;\n const requestOptions = parseRequestArgs(documentOrOptions, variables, requestHeaders);\n const { headers, fetch = crossFetch, method = `POST`, requestMiddleware, responseMiddleware, ...fetchOptions } = this.requestConfig;\n const { url } = this;\n if (requestOptions.signal !== undefined) {\n fetchOptions.signal = requestOptions.signal;\n }\n const { query, operationName } = resolveRequestDocument(requestOptions.document);\n return makeRequest({\n url,\n query,\n variables: requestOptions.variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(requestOptions.requestHeaders),\n },\n operationName,\n fetch,\n method,\n fetchOptions,\n middleware: requestMiddleware,\n })\n .then((response) => {\n if (responseMiddleware) {\n responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (responseMiddleware) {\n responseMiddleware(error);\n }\n throw error;\n });\n }\n // prettier-ignore\n batchRequests(documentsOrOptions, requestHeaders) {\n const batchRequestOptions = parseBatchRequestArgs(documentsOrOptions, requestHeaders);\n const { headers, ...fetchOptions } = this.requestConfig;\n if (batchRequestOptions.signal !== undefined) {\n fetchOptions.signal = batchRequestOptions.signal;\n }\n const queries = batchRequestOptions.documents.map(({ document }) => resolveRequestDocument(document).query);\n const variables = batchRequestOptions.documents.map(({ variables }) => variables);\n return makeRequest({\n url: this.url,\n query: queries,\n // @ts-expect-error TODO reconcile batch variables into system.\n variables,\n headers: {\n ...resolveHeaders(callOrIdentity(headers)),\n ...resolveHeaders(batchRequestOptions.requestHeaders),\n },\n operationName: undefined,\n fetch: this.requestConfig.fetch ?? crossFetch,\n method: this.requestConfig.method || `POST`,\n fetchOptions,\n middleware: this.requestConfig.requestMiddleware,\n })\n .then((response) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(response);\n }\n return response.data;\n })\n .catch((error) => {\n if (this.requestConfig.responseMiddleware) {\n this.requestConfig.responseMiddleware(error);\n }\n throw error;\n });\n }\n setHeaders(headers) {\n this.requestConfig.headers = headers;\n return this;\n }\n /**\n * Attach a header to the client. All subsequent requests will have this header.\n */\n setHeader(key, value) {\n const { headers } = this.requestConfig;\n if (headers) {\n // todo what if headers is in nested array form... ?\n //@ts-expect-error todo\n headers[key] = value;\n }\n else {\n this.requestConfig.headers = { [key]: value };\n }\n return this;\n }\n /**\n * Change the client endpoint. All subsequent requests will send to this endpoint.\n */\n setEndpoint(value) {\n this.url = value;\n return this;\n }\n}\nconst makeRequest = async (params) => {\n const { query, variables, fetchOptions } = params;\n const fetcher = createHttpMethodFetcher(uppercase(params.method ?? `post`));\n const isBatchingQuery = Array.isArray(params.query);\n const response = await fetcher(params);\n const result = await getResult(response, fetchOptions.jsonSerializer ?? defaultJsonSerializer);\n const successfullyReceivedData = Array.isArray(result)\n ? !result.some(({ data }) => !data)\n : Boolean(result.data);\n const successfullyPassedErrorPolicy = Array.isArray(result) ||\n !result.errors ||\n (Array.isArray(result.errors) && !result.errors.length) ||\n fetchOptions.errorPolicy === `all` ||\n fetchOptions.errorPolicy === `ignore`;\n if (response.ok && successfullyPassedErrorPolicy && successfullyReceivedData) {\n // @ts-expect-error TODO fixme\n const { errors: _, ...rest } = Array.isArray(result) ? result : result;\n const data = fetchOptions.errorPolicy === `ignore` ? rest : result;\n const dataEnvelope = isBatchingQuery ? { data } : data;\n // @ts-expect-error TODO\n return {\n ...dataEnvelope,\n headers: response.headers,\n status: response.status,\n };\n }\n else {\n const errorResult = typeof result === `string`\n ? {\n error: result,\n }\n : result;\n throw new ClientError(\n // @ts-expect-error TODO\n { ...errorResult, status: response.status, headers: response.headers }, { query, variables });\n }\n};\n/**\n * Send a GraphQL Query to the GraphQL server for execution.\n */\nconst rawRequest = async (...args) => {\n const [urlOrOptions, query, ...variablesAndRequestHeaders] = args;\n const requestOptions = parseRawRequestExtendedArgs(urlOrOptions, query, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.rawRequest({\n ...requestOptions,\n });\n};\n// prettier-ignore\n// eslint-disable-next-line\nasync function request(urlOrOptions, document, ...variablesAndRequestHeaders) {\n const requestOptions = parseRequestExtendedArgs(urlOrOptions, document, ...variablesAndRequestHeaders);\n const client = new GraphQLClient(requestOptions.url);\n return client.request({\n ...requestOptions,\n });\n}\n/**\n * Send a batch of GraphQL Document to the GraphQL server for execution.\n *\n * @example\n *\n * ```ts\n * // You can pass a raw string\n *\n * await batchRequests('https://foo.bar/graphql', [\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * },\n * {\n * query: `\n * {\n * query {\n * users\n * }\n * }`\n * }])\n *\n * // You can also pass a GraphQL DocumentNode as query. Convenient if you\n * // are using graphql-tag package.\n *\n * import gql from 'graphql-tag'\n *\n * await batchRequests('https://foo.bar/graphql', [{ query: gql`...` }])\n * ```\n */\nconst batchRequests = async (...args) => {\n const params = parseBatchRequestsArgsExtended(args);\n const client = new GraphQLClient(params.url);\n return client.batchRequests(params);\n};\nconst parseBatchRequestsArgsExtended = (args) => {\n if (args.length === 1) {\n return args[0];\n }\n else {\n return {\n url: args[0],\n documents: args[1],\n requestHeaders: args[2],\n signal: undefined,\n };\n }\n};\nconst createRequestBody = (query, variables, operationName, jsonSerializer) => {\n const jsonSerializer_ = jsonSerializer ?? defaultJsonSerializer;\n if (!Array.isArray(query)) {\n return jsonSerializer_.stringify({ query, variables, operationName });\n }\n if (typeof variables !== `undefined` && !Array.isArray(variables)) {\n throw new Error(`Cannot create request body with given variable type, array expected`);\n }\n // Batch support\n const payload = query.reduce((acc, currentQuery, index) => {\n acc.push({ query: currentQuery, variables: variables ? variables[index] : undefined });\n return acc;\n }, []);\n return jsonSerializer_.stringify(payload);\n};\nconst getResult = async (response, jsonSerializer) => {\n let contentType;\n response.headers.forEach((value, key) => {\n if (key.toLowerCase() === `content-type`) {\n contentType = value;\n }\n });\n if (contentType &&\n (contentType.toLowerCase().startsWith(`application/json`) ||\n contentType.toLowerCase().startsWith(`application/graphql+json`) ||\n contentType.toLowerCase().startsWith(`application/graphql-response+json`))) {\n return jsonSerializer.parse(await response.text());\n }\n else {\n return response.text();\n }\n};\nconst callOrIdentity = (value) => {\n return typeof value === `function` ? value() : value;\n};\n/**\n * Convenience passthrough template tag to get the benefits of tooling for the gql template tag. This does not actually parse the input into a GraphQL DocumentNode like graphql-tag package does. It just returns the string with any variables given interpolated. Can save you a bit of performance and having to install another package.\n *\n * @example\n * ```\n * import { gql } from 'graphql-request'\n *\n * await request('https://foo.bar/graphql', gql`...`)\n * ```\n *\n * @remarks\n *\n * Several tools in the Node GraphQL ecosystem are hardcoded to specially treat any template tag named \"gql\". For example see this prettier issue: https://github.com/prettier/prettier/issues/4360. Using this template tag has no runtime effect beyond variable interpolation.\n */\nexport const gql = (chunks, ...variables) => {\n return chunks.reduce((acc, chunk, index) => `${acc}${chunk}${index in variables ? String(variables[index]) : ``}`, ``);\n};\nexport { GraphQLWebSocketClient } from './graphql-ws.js';\nexport { resolveRequestDocument } from './resolveRequestDocument.js';\nexport { batchRequests, ClientError, GraphQLClient, rawRequest, request, };\nexport default request;\n//# sourceMappingURL=index.js.map"],"names":["defaultJsonSerializer","uppercase","str","HeadersInstanceToPlainObject","headers","o","v","k","parseRequestArgs","documentOrOptions","variables","requestHeaders","parseRawRequestArgs","queryOrOptions","parseBatchRequestArgs","documentsOrOptions","extractOperationName","document","operationName","operationDefinitions","definition","_b","_a","resolveRequestDocument","parsedDocument","parse","print","ClientError","response","request","message","resolveHeaders","oHeaders","CrossFetch","CrossFetch.Headers","name","value","cleanQuery","buildRequestConfig","params","params_","search","payload","acc","currentQuery","index","createHttpMethodFetcher","method","url","query","fetch","fetchOptions","middleware","queryParams","body","createRequestBody","init","urlResolved","initResolved","result","urlNew","initNew","GraphQLClient","requestConfig","args","rawRequestOptions","crossFetch","requestMiddleware","responseMiddleware","makeRequest","callOrIdentity","error","variablesAndRequestHeaders","requestOptions","batchRequestOptions","queries","key","fetcher","isBatchingQuery","getResult","successfullyReceivedData","data","successfullyPassedErrorPolicy","_","rest","errorResult","jsonSerializer","jsonSerializer_","contentType"],"mappings":"6GAAO,MAAMA,EAAwB,KCAxBC,EAAaC,GAAQA,EAAI,YAAa,EAItCC,EAAgCC,GAAY,CACrD,MAAMC,EAAI,CAAE,EACZ,OAAAD,EAAQ,QAAQ,CAACE,EAAGC,IAAM,CACtBF,EAAEE,CAAC,EAAID,CACf,CAAK,EACMD,CACX,ECVaG,EAAmB,CAACC,EAAmBC,EAAWC,IACpDF,EAAkB,SACnBA,EACA,CACE,SAAUA,EACV,UAAWC,EACX,eAAgBC,EAChB,OAAQ,MACX,EAEIC,EAAsB,CAACC,EAAgBH,EAAWC,IACpDE,EAAe,MAChBA,EACA,CACE,MAAOA,EACP,UAAWH,EACX,eAAgBC,EAChB,OAAQ,MAC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