Skip to content

chore(sentry): remove unused @nestjs/apollo, @nestjs/graphql, @apollo/server#20452

Merged
vpomerleau merged 1 commit intomainfrom
FXA-13606
May 5, 2026
Merged

chore(sentry): remove unused @nestjs/apollo, @nestjs/graphql, @apollo/server#20452
vpomerleau merged 1 commit intomainfrom
FXA-13606

Conversation

@vpomerleau
Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau commented Apr 23, 2026

Because

  • fxa-graphql-api was retired and fxa-admin-server/admin-panel migrated from GraphQL to REST, so nothing in the monorepo reaches @nestjs/apollo, @nestjs/graphql, or @apollo/server at runtime.
  • The only remaining surface was three stale Sentry integration files: a SentryPlugin class with zero importers and two dead graphql context branches in the reporting helpers.
  • Dropping them shrinks the NestJS 11 lockstep upgrade scope (FXA-13358), obsoletes dependabot PR chore(deps): bump @apollo/server from 4.13.0 to 5.5.0 #20275 (@apollo/server 4 → 5), and eliminates five related advisories including GHSA-9q82-xgwf-vj6h.

This pull request

  • Deletes libs/shared/sentry/src/lib/nest/sentry.plugin.ts and its barrel export.
  • Strips @nestjs/graphql and @apollo/server imports, isApolloError, and processException from reporting.ts in both libs/shared/sentry and libs/shared/sentry-nest, and removes the isApolloError call from ignoreError.
  • Removes the "should ignore apollo errors" test and GraphQLError import from both reporting.spec.ts files.
  • Removes @apollo/server, @nestjs/apollo, and @nestjs/graphql from root package.json and the corresponding yarn.lock entries.
  • Drops '@nestjs/apollo' and '@nestjs/graphql' from the serverExternalPackages array in apps/payments/next/next.config.js since those packages no longer resolve.
  • Pins @types/node-fetch ^2.6.12 as a direct root devDependency — @apollo/server was transitively providing it, and packages/fxa-admin-server/src/newsletters/basket.service.ts still imports from node-fetch.
  • Migrates libs/vendored/jwtool/src/lib/jwtool.ts to Node 22's global fetch (typed via @types/node/globals.d.ts) so the vendored library no longer imports node-fetch.

Issue that this pull request solves

Closes: FXA-13606

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

Copilot AI review requested due to automatic review settings April 23, 2026 22:45
@vpomerleau vpomerleau requested a review from a team as a code owner April 23, 2026 22:45
@vpomerleau vpomerleau changed the title Because: chore(sentry): remove unused @nestjs/apollo, @nestjs/graphql, @apollo/server Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes dead GraphQL/Apollo-related Sentry integration code and dependencies now that GraphQL runtime surfaces have been retired from the monorepo, reducing upgrade scope (notably for the NestJS 11 lockstep) and eliminating the need for the pending Apollo Server dependency bump.

Changes:

  • Delete the unused Nest/Apollo SentryPlugin and stop exporting it from @fxa/shared/sentry.
  • Remove GraphQL/Apollo-specific error handling branches (isApolloError, processException) from Sentry reporting helpers (and associated unit tests).
  • Drop @apollo/server, @nestjs/apollo, and @nestjs/graphql from root dependencies and prune the lockfile accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Removes Apollo Server / Nest GraphQL transitive dependency entries after dependency cleanup.
package.json Drops unused GraphQL server-side dependencies from root dependencies.
libs/shared/sentry/src/lib/reporting.ts Removes Apollo/GraphQL-specific ignore/reporting helpers and related imports.
libs/shared/sentry/src/lib/reporting.spec.ts Deletes the “ignore apollo errors” test and GraphQLError import.
libs/shared/sentry/src/lib/nest/sentry.plugin.ts Deletes the unused Apollo Server Sentry plugin implementation.
libs/shared/sentry/src/index.ts Removes barrel export for the deleted Sentry plugin.
libs/shared/sentry-nest/src/lib/reporting.ts Removes Apollo/GraphQL-specific helpers/branches from Nest Sentry reporting utilities.
libs/shared/sentry-nest/src/lib/reporting.spec.ts Deletes the “ignore apollo errors” test and GraphQLError import.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/payments/next/next.config.js
…/server

Because:
- fxa-graphql-api was retired and fxa-admin-server/admin-panel migrated
  from GraphQL to REST, so nothing in the monorepo reaches
  @nestjs/apollo, @nestjs/graphql, or @apollo/server at runtime.
- The only remaining surface was three stale Sentry integration files:
  a SentryPlugin class with zero importers and two dead `graphql`
  context branches in the reporting helpers.
- Dropping them shrinks the NestJS 11 lockstep upgrade scope
  (FXA-13358), obsoletes dependabot PR #20275 (@apollo/server 4 → 5),
  and eliminates five related advisories including GHSA-9q82-xgwf-vj6h.

This commit:
- Deletes libs/shared/sentry/src/lib/nest/sentry.plugin.ts and its
  barrel export.
- Strips @nestjs/graphql and @apollo/server imports, isApolloError,
  and processException from reporting.ts in both libs/shared/sentry
  and libs/shared/sentry-nest, and removes the isApolloError call
  from ignoreError.
- Removes the "should ignore apollo errors" test and GraphQLError
  import from both reporting.spec.ts files.
- Removes @apollo/server, @nestjs/apollo, and @nestjs/graphql from the
  root package.json and the corresponding yarn.lock entries.
- Drops '@nestjs/apollo' and '@nestjs/graphql' from the
  serverExternalPackages array in apps/payments/next/next.config.js
  since those packages no longer resolve.
- Pins @types/node-fetch ^2.6.12 as a direct root devDependency —
  @apollo/server was transitively providing it, and
  packages/fxa-admin-server/src/newsletters/basket.service.ts still
  imports from node-fetch.
- Migrates libs/vendored/jwtool/src/lib/jwtool.ts to Node 22's global
  fetch (typed via @types/node/globals.d.ts) so the vendored library
  no longer imports node-fetch.

Closes #FXA-13606
@vpomerleau vpomerleau merged commit 1bc85f9 into main May 5, 2026
21 checks passed
@vpomerleau vpomerleau deleted the FXA-13606 branch May 5, 2026 20:54
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.

4 participants