Skip to content

fix(apollo): skip aliased providers when exploring plugins - #4235

Merged
kamilmysliwiec merged 1 commit into
nestjs:masterfrom
thekhegay:fix/plugins-explorer-alias
Nov 11, 2026
Merged

kamilmysliwiec merged 1 commit into
nestjs:masterfrom
thekhegay:fix/plugins-explorer-alias

Conversation

@thekhegay

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

PluginsExplorerService returns an @Plugin() provider twice when it is also registered with useExisting, becuase the alias wrapper shares the instance of the original. Resolvers explorer alredy skips such wrappers via isAlias

Same issue as in nestjs/event-emitter#578, fixed in nestjs/event-emitter#579

Issue Number: N/A

What is the new behavior?

filterPlugins skips alias wrappers, so the plugin is returned once. Added a test with a useExisting alias

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kamilmysliwiec
kamilmysliwiec merged commit 03c778a into nestjs:master Nov 11, 2026
1 check passed
@thekhegay
thekhegay deleted the fix/plugins-explorer-alias branch November 11, 2026 16:34
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.

2 participants