Learning Resources

Medusa Container Resources

This documentation page includes the list of resources registered in the Medusa container of your Medusa application.

NoteUse the ContainerRegistrationKeys enum imported from @medusajs/utils to resolve these resources' names.

Resource

Description

Registration Name

Configurations

The configurations that are exported from medusa-config.js.

configModule or ContainerRegistrationKeys.CONFIG_MODULE

Logger

An instance of Medusa CLI’s logger. You can use it to log messages to the terminal.

logger or ContainerRegistrationKeys.LOGGER

Query

The Query utility methods.

query or ContainerRegistrationKeys.QUERY

Remote Link

The remote link function.

remoteLink or ContainerRegistrationKeys.REMOTE_LINK

Modules' main services

The main service of every module added in medusa-config.js.

  • For custom modules, the registration name is the key of the module in the modules configuration.
  • For Medusa's commerce modules, you can use the Modules enum imported from @medusajs/utils.
Was this page helpful?
Edit this page