apollo-link-sentry
Version:
[Apollo Link](https://www.apollographql.com/docs/react/api/link/introduction) to enrich [Sentry](https://sentry.io) events with [GraphQL](https://graphql.org) data
18 lines (17 loc) • 637 B
TypeScript
import { FetchResult, Operation } from '@apollo/client/core';
import { Breadcrumb as SentryBreadcrumb } from '@sentry/core';
import { FullOptions } from './options';
export interface BreadcrumbData {
url?: string;
query?: string;
variables?: Record<string, unknown>;
operationName?: string;
fetchResult?: FetchResult | string;
error?: Error;
cache?: Record<string, unknown>;
context?: Record<string, unknown>;
}
export interface GraphQLBreadcrumb extends SentryBreadcrumb {
data: BreadcrumbData;
}
export declare function makeBreadcrumb(operation: Operation, options: FullOptions): GraphQLBreadcrumb;