typedi icon indicating copy to clipboard operation
typedi copied to clipboard

Question: Service Injection working incorrectly

Open jdeal391890293 opened this issue 2 years ago • 1 comments

Objective: I aimed to share the same dependency injection container between an Apollo GraphQL API and a REST API. Both APIs employ constructor-based service injection, and I intended to reuse the declared service in this shared container.

Issue Encountered: While the constructor-based service injection works seamlessly within the GraphQL API, an issue arises when attempting to utilize the same services in the REST API. Upon doing so, the GraphQL API begins to malfunction, logging all services as undefined.

Request for Assistance: I'd appreciate any guidance or advice on resolving this issue. It's imperative for both APIs to cohesively share the same services without compromising functionality.

jdeal391890293 avatar Sep 25 '23 13:09 jdeal391890293

Could you provide a basic reproduction code? Never heard of something like this before.

attilaorosz avatar Sep 27 '23 09:09 attilaorosz