Skip to content

Simplify SentryLink #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Simplify SentryLink #483

wants to merge 1 commit into from

Conversation

ab-pm
Copy link

@ab-pm ab-pm commented Apr 16, 2025

It seems that the repeated checks for if (attachBreadcrumbs) can be extracted out of the observable creation. As far as I can tell, if attachBreadcrumb is not set, the new Observable does nothing except to forward all calls to the originalObserver. So one can instead just have an early return forward(operation);.
This obviates the need for the dull (and repetitive) type assertions of breadcrumb as GraphQLBreadcrumb with the // We must have a breadcrumb if attachBreadcrumbs was set justification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant