Medusa and Module Container Resources
This reference provides the list of resources registered in the Medusa container and module containers.
Medusa Container Resources#
The following table lists all resources that you can resolve in your customizations outside a module (such as API routes, workflows, subscribers, and scheduled jobs).
ContainerRegistrationKeys enum imported from @medusajs/framework/utils where specified.Resource | Description | Registration Name |
|---|---|---|
The configurations defined in |
| |
Utility to log messages to the terminal. |
| |
Query to retrieve data across modules. |
| |
Manage links between records of two modules' data models. |
| |
Knex | Knex query builder connected to your application's database. Avoid performing database operations with this query builder and instead use services. This is only available for general database connectivity purposes. |
|
Modules' main services | The main service of every module added in |
|
Module Container Resources#
The following table lists all resources that you can resolve in a module's services or loaders.
ContainerRegistrationKeys and Modules enums imported from @medusajs/framework/utils where specified.Resource | Description | Registration Name |
|---|---|---|
Utility to log messages to the terminal. |
| |
Entity Manager | An instance of MikroORM's entity manager. |
|
An instance of the base repository, used to run transactions and perform database operations. |
| |
The configurations defined in |
| |
Event Module's service | The service of the Event Module, used to emit events. |
|
Services generated by the service factory | The service of every data model passed to the | Each service is registered as the camel-cased name of the data model. For example:
|
Module services | You can resolve the module's services from one another, but not in loaders. Learn more in the Module Container documentation. | Each service is registered as the camel-cased name of the service. For example:
|