Skip to content

Commit 4d7f0e5

Browse files
committed
Rename
1 parent d4c2ab8 commit 4d7f0e5

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/SentryLink.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import { Severity } from '@sentry/types';
88
import Observable from 'zen-observable';
99

1010
import { GraphQLBreadcrumb, makeBreadcrumb } from './breadcrumb';
11-
import { ApolloLinkSentryOptions, Options, withDefaults } from './options';
11+
import { FullOptions, SentryLinkOptions, withDefaults } from './options';
1212
import {
1313
attachBreadcrumbToSentry,
1414
setFingerprint,
1515
setTransaction,
1616
} from './sentry';
1717

1818
export class SentryLink extends ApolloLink {
19-
private readonly options: ApolloLinkSentryOptions;
19+
private readonly options: FullOptions;
2020

21-
constructor(options: Options = {}) {
21+
constructor(options: SentryLinkOptions = {}) {
2222
super();
2323
this.options = withDefaults(options);
2424
}

src/breadcrumb.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import dotProp from 'dot-prop';
44
import { print } from 'graphql';
55

66
import { extractDefinition } from './operation';
7-
import { ApolloLinkSentryOptions, AttachBreadcrumbsOptions } from './options';
7+
import { FullOptions, AttachBreadcrumbsOptions } from './options';
88

99
export interface BreadcrumbData {
1010
url?: string;
@@ -23,7 +23,7 @@ export interface GraphQLBreadcrumb extends SentryBreadcrumb {
2323

2424
export function makeBreadcrumb(
2525
operation: Operation,
26-
options: ApolloLinkSentryOptions,
26+
options: FullOptions,
2727
): GraphQLBreadcrumb {
2828
// We validated this is set before calling this function
2929
const attachBreadcrumbs = options.attachBreadcrumbs as AttachBreadcrumbsOptions;

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export { SentryLink } from './SentryLink';
2-
export { Options } from './options';
2+
export { SentryLinkOptions } from './options';
33
export { GraphQLBreadcrumb } from './breadcrumb';
44
export {
55
excludeGraphQLFetch,

src/options.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { GraphQLBreadcrumb } from './breadcrumb';
66

77
export type NonEmptyArray<T> = [T, ...Array<T>];
88

9-
export interface ApolloLinkSentryOptions {
9+
export interface FullOptions {
1010
/**
1111
* Determines if the given operation should be handled or discarded.
1212
*
@@ -121,13 +121,13 @@ export const defaultOptions = {
121121
},
122122
} as const;
123123

124-
export function withDefaults(options: Options): ApolloLinkSentryOptions {
124+
export function withDefaults(options: SentryLinkOptions): FullOptions {
125125
return deepMerge(defaultOptions, options);
126126
}
127127

128-
export type Options = Partial<
128+
export type SentryLinkOptions = Partial<
129129
Pick<
130-
ApolloLinkSentryOptions,
130+
FullOptions,
131131
'shouldHandleOperation' | 'uri' | 'setTransaction' | 'setFingerprint'
132132
>
133133
> & {

src/sentry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Scope } from '@sentry/types';
44

55
import { GraphQLBreadcrumb } from './breadcrumb';
66
import { extractDefinition } from './operation';
7-
import { ApolloLinkSentryOptions } from './options';
7+
import { FullOptions } from './options';
88

99
export function setTransaction(operation: Operation): void {
1010
const definition = extractDefinition(operation);
@@ -33,7 +33,7 @@ export function setFingerprint(operation: Operation): void {
3333
export function attachBreadcrumbToSentry(
3434
operation: Operation,
3535
breadcrumb: GraphQLBreadcrumb,
36-
options: ApolloLinkSentryOptions,
36+
options: FullOptions,
3737
): void {
3838
if (
3939
options.attachBreadcrumbs &&

tests/apolloSentryLink.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { GraphQLError, parse } from 'graphql';
55
import sentryTestkit from 'sentry-testkit';
66
import Observable from 'zen-observable';
77

8-
import { GraphQLBreadcrumb, SentryLink, Options } from '../src';
8+
import { GraphQLBreadcrumb, SentryLink, SentryLinkOptions } from '../src';
99
import { DEFAULT_FINGERPRINT } from '../src/sentry';
1010

1111
const { testkit, sentryTransport } = sentryTestkit();
@@ -58,7 +58,7 @@ describe('SentryLink', () => {
5858
});
5959

6060
it('should attach a breadcrumb for each apolloOperation', (done) => {
61-
const includeErrorAndResultOptions: Options = {
61+
const includeErrorAndResultOptions: SentryLinkOptions = {
6262
attachBreadcrumbs: { includeResult: true, includeError: true },
6363
};
6464

0 commit comments

Comments
 (0)