Files
klz-cables.com/.pnpm-store/v10/files/6a/a263e560d15793133797ef179f52f06d5a2a5667fee70f56b0b77d62377f2ecd29f9c13be0d938318623a31243a1b27d1a6ac01e1050c98675e4fdcebdccf8
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

58 lines
2.0 KiB
Plaintext

import type { FetchHint, XhrHint } from '@sentry-internal/browser-utils';
interface GraphQLClientOptions {
endpoints: Array<string | RegExp>;
}
/** Standard graphql request shape: https://graphql.org/learn/serving-over-http/#post-request-and-body */
interface GraphQLStandardRequest {
query: string;
operationName?: string;
variables?: Record<string, unknown>;
extensions?: Record<string, unknown>;
}
/** Persisted operation request */
interface GraphQLPersistedRequest {
operationName: string;
variables?: Record<string, unknown>;
extensions: {
persistedQuery: {
version: number;
sha256Hash: string;
};
} & Record<string, unknown>;
}
type GraphQLRequestPayload = GraphQLStandardRequest | GraphQLPersistedRequest;
interface GraphQLOperation {
operationType?: string;
operationName?: string;
}
/**
* @param requestBody - GraphQL request
* @returns A formatted version of the request: 'TYPE NAME' or 'TYPE' or 'persisted NAME'
*/
export declare function _getGraphQLOperation(requestBody: GraphQLRequestPayload): string;
/**
* Get the request body/payload based on the shape of the hint.
*
* Exported for tests only.
*/
export declare function getRequestPayloadXhrOrFetch(hint: XhrHint | FetchHint): string | undefined;
/**
* Extract the name and type of the operation from the GraphQL query.
*
* Exported for tests only.
*/
export declare function parseGraphQLQuery(query: string): GraphQLOperation;
/**
* Extract the payload of a request if it's GraphQL.
* Exported for tests only.
* @param payload - A valid JSON string
* @returns A POJO or undefined
*/
export declare function getGraphQLRequestPayload(payload: string): GraphQLRequestPayload | undefined;
/**
* This integration ensures that GraphQL requests made in the browser
* have their GraphQL-specific data captured and attached to spans and breadcrumbs.
*/
export declare const graphqlClientIntegration: (options: GraphQLClientOptions) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=graphqlClient.d.ts.map