Links between Currency Module and Other Modules

This document showcases the module links defined between the Currency Module and other commerce modules.

Summary#

The Currency Module has the following links to other modules:

TipRead-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database.

First Data Model

Second Data Model

Type

Description

Store in Store Module

Currency

Read-only

Learn more


Store Module#

The Store Module has a Currency data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol.

Instead, Medusa defines a read-only link between the Store Module's Currency data model and the Currency Module's Currency data model. Because the link is read-only from the Store's side, you can only retrieve the details of a store's supported currencies, and not the other way around.

Retrieve with Query#

To retrieve the details of a store's currencies with Query, pass supported_currencies.currency.* in fields:

Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break