docs: updates to link to other modules docs (#12225)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-04-18 09:28:39 +03:00
1 parent 6a9417a1bb
commit c8ec59e323
19 files changed
+16588 -16588

No files matched your search

@@ -38,7 +38,7 @@ The API Key Module has the following links to other modules:
[SalesChannel](/references/sales-channel/models/SalesChannel) in [Sales Channel Module](../../sales-channel/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#sales-channel-module)
@@ -74,7 +74,7 @@ const { data: apiKeys } = await query.graph({
],
})
// apiKeys.sales_channels
// apiKeys[0].sales_channels
```
</CodeTab>
@@ -92,7 +92,7 @@ const { data: apiKeys } = useQueryGraphStep({
],
})
// apiKeys.sales_channels
// apiKeys[0].sales_channels
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Customer](/references/customer/models/Customer) in [Customer Module](../../customer/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#customer-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Cart](/references/cart/models/Cart)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PaymentCollection](/references/payment/models/PaymentCollection) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -86,7 +86,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Product](/references/product/models/Product) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -100,7 +100,7 @@ Read-only links are used to query data across modules, but the relations aren't
[ProductVariant](/references/product/models/ProductVariant) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -114,7 +114,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Promotion](/references/promotion/models/Promotion) in [Promotion Module](../../promotion/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#promotion-module)
@@ -128,7 +128,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Region](/references/region/models/Region) in [Region Module](../../region/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#region-module)
@@ -142,7 +142,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel) in [Sales Channel Module](../../sales-channel/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#sales-channel-module)
@@ -174,7 +174,7 @@ const { data: carts } = await query.graph({
],
})
// carts.order
// carts[0].customer
```
</CodeTab>
@@ -192,7 +192,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.order
// carts[0].customer
```
</CodeTab>
@@ -223,7 +223,7 @@ const { data: carts } = await query.graph({
],
})
// carts.order
// carts[0].order
```
</CodeTab>
@@ -241,7 +241,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.order
// carts[0].order
```
</CodeTab>
@@ -316,7 +316,7 @@ const { data: carts } = await query.graph({
],
})
// carts.payment_collection
// carts[0].payment_collection
```
</CodeTab>
@@ -334,7 +334,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.payment_collection
// carts[0].payment_collection
```
</CodeTab>
@@ -470,7 +470,7 @@ const { data: carts } = await query.graph({
],
})
// carts.promotions
// carts[0].promotions
```
</CodeTab>
@@ -488,7 +488,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.promotions
// carts[0].promotions
```
</CodeTab>
@@ -559,7 +559,7 @@ const { data: carts } = await query.graph({
],
})
// carts.region
// carts[0].region
```
</CodeTab>
@@ -577,7 +577,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.region
// carts[0].region
```
</CodeTab>
@@ -604,7 +604,7 @@ const { data: carts } = await query.graph({
],
})
// carts.sales_channel
// carts[0].sales_channel
```
</CodeTab>
@@ -622,7 +622,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.sales_channel
// carts[0].sales_channel
```
</CodeTab>
@@ -38,13 +38,13 @@ Read-only links are used to query data across modules, but the relations aren't
<Table.Body>
<Table.Row>
<Table.Cell>
[Store](/references/store/models/Store) in [Store Module](../../store/page.mdx)
[StoreCurrency](/references/store/models/StoreCurrency) in [Store Module](../../store/page.mdx)
</Table.Cell>
<Table.Cell>
[Currency](/references/currency/models/Currency)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#store-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
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](../../store/page.mdx)'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.
Instead, Medusa defines a read-only link between the [Store Module](../../store/page.mdx)'s `StoreCurrency` 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
@@ -75,7 +75,7 @@ const { data: stores } = await query.graph({
],
})
// stores.supported_currencies
// stores[0].supported_currencies[0].currency
```
</CodeTab>
@@ -93,7 +93,7 @@ const { data: stores } = useQueryGraphStep({
],
})
// stores.supported_currencies
// stores[0].supported_currencies[0].currency
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[AccountHolder](/references/payment/models/AccountHolder) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Customer](/references/customer/models/Customer)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Customer](/references/customer/models/Customer)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -105,11 +105,11 @@ To retrieve the account holder associated with a customer with [Query](!docs!/le
const { data: customers } = await query.graph({
entity: "customer",
fields: [
"account_holders.*",
"account_holder_link.account_holder.*",
],
})
// customers.account_holders
// customers[0].account_holder_link?.[0]?.account_holder
```
</CodeTab>
@@ -123,11 +123,11 @@ import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
const { data: customers } = useQueryGraphStep({
entity: "customer",
fields: [
"account_holders.*",
"account_holder_link.account_holder.*",
],
})
// customers.account_holders
// customers[0].account_holder_link?.[0]?.account_holder
```
</CodeTab>
@@ -38,7 +38,7 @@ The Fulfillment Module has the following links to other modules:
[Fulfillment](/references/fulfillment/models/Fulfillment)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -52,7 +52,7 @@ The Fulfillment Module has the following links to other modules:
[Fulfillment](/references/fulfillment/models/Fulfillment)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -66,7 +66,7 @@ The Fulfillment Module has the following links to other modules:
[ShippingOption](/references/fulfillment/models/ShippingOption)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#pricing-module)
@@ -80,7 +80,7 @@ The Fulfillment Module has the following links to other modules:
[ShippingProfile](/references/fulfillment/models/ShippingProfile)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -94,7 +94,7 @@ The Fulfillment Module has the following links to other modules:
[FulfillmentProvider](/references/fulfillment/models/FulfillmentProvider)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#stock-location-module)
@@ -108,7 +108,7 @@ The Fulfillment Module has the following links to other modules:
[FulfillmentSet](/references/fulfillment/models/FulfillmentSet)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#stock-location-module)
@@ -241,11 +241,11 @@ To retrieve the price set of a shipping option with [Query](!docs!/learn/fundame
const { data: shippingOptions } = await query.graph({
entity: "shipping_option",
fields: [
"price_set.*",
"price_set_link.*",
],
})
// shippingOptions.price_set
// shippingOptions[0].price_set_link?.price_set_id
```
</CodeTab>
@@ -259,11 +259,11 @@ import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
const { data: shippingOptions } = useQueryGraphStep({
entity: "shipping_option",
fields: [
"price_set.*",
"price_set_link.*",
],
})
// shippingOptions.price_set
// shippingOptions[0].price_set_link?.price_set_id
```
</CodeTab>
@@ -340,7 +340,7 @@ const { data: shippingProfiles } = await query.graph({
],
})
// shippingProfiles.products
// shippingProfiles[0].products
```
</CodeTab>
@@ -358,7 +358,7 @@ const { data: shippingProfiles } = useQueryGraphStep({
],
})
// shippingProfiles.products
// shippingProfiles[0].products
```
</CodeTab>
@@ -443,7 +443,7 @@ const { data: fulfillmentSets } = await query.graph({
],
})
// fulfillmentSets.location
// fulfillmentSets[0].location
```
</CodeTab>
@@ -461,7 +461,7 @@ const { data: fulfillmentSets } = useQueryGraphStep({
],
})
// fulfillmentSets.location
// fulfillmentSets[0].location
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[InventoryItem](/references/inventory/models/InventoryItem)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[StockLocation](/references/stock-location/models/StockLocation) in [Stock Location Module](../../stock-location/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#stock-location-module)
@@ -98,7 +98,7 @@ const { data: inventoryItems } = await query.graph({
],
})
// inventoryItems.variants
// inventoryItems[0].variants
```
</CodeTab>
@@ -116,7 +116,7 @@ const { data: inventoryItems } = useQueryGraphStep({
],
})
// inventoryItems.variants
// inventoryItems[0].variants
```
</CodeTab>
@@ -187,7 +187,7 @@ const { data: inventoryLevels } = await query.graph({
],
})
// inventoryLevels.stock_locations
// inventoryLevels[0].stock_locations
```
</CodeTab>
@@ -205,7 +205,7 @@ const { data: inventoryLevels } = useQueryGraphStep({
],
})
// inventoryLevels.stock_locations
// inventoryLevels[0].stock_locations
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Customer](/references/customer/models/Customer) in [Customer Module](../../customer/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#customer-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Cart](/references/cart/models/Cart) in [Cart Module](../../cart/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Fulfillment](/references/fulfillment/models/Fulfillment) in [Fulfillment Module](../../fulfillment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -86,7 +86,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Fulfillment](/references/fulfillment/models/Fulfillment) in [Fulfillment Module](../../fulfillment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -100,7 +100,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PaymentCollection](/references/payment/models/PaymentCollection) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -114,7 +114,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PaymentCollection](/references/payment/models/PaymentCollection) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -128,7 +128,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PaymentCollection](/references/payment/models/PaymentCollection) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -136,13 +136,13 @@ Read-only links are used to query data across modules, but the relations aren't
</Table.Row>
<Table.Row>
<Table.Cell>
[Order](/references/order/models/Order)
[OrderLineItem](/references/order/models/OrderLineItem)
</Table.Cell>
<Table.Cell>
[Product](/references/product/models/Product) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -156,7 +156,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Promotion](/references/promotion/models/Promotion) in [Promotion Module](../../promotion/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#promotion-module)
@@ -170,7 +170,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Region](/references/region/models/Region) in [Region Module](../../region/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#region-module)
@@ -184,7 +184,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel) in [Sales Channel Module](../../sales-channel/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#sales-channel-module)
@@ -214,7 +214,7 @@ const { data: orders } = await query.graph({
],
})
// orders.customer
// orders[0].customer
```
</CodeTab>
@@ -232,7 +232,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.customer
// orders[0].customer
```
</CodeTab>
@@ -263,7 +263,7 @@ const { data: orders } = await query.graph({
],
})
// orders.cart
// orders[0].cart
```
</CodeTab>
@@ -281,7 +281,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.cart
// orders[0].cart
```
</CodeTab>
@@ -364,7 +364,7 @@ const { data: orders } = await query.graph({
],
})
// orders.fulfillments
// orders[0].fulfillments
```
</CodeTab>
@@ -382,7 +382,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.fulfillments
// orders[0].fulfillments
```
</CodeTab>
@@ -457,7 +457,7 @@ const { data: orders } = await query.graph({
],
})
// orders.payment_collections
// orders[0].payment_collections
```
</CodeTab>
@@ -475,7 +475,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.payment_collections
// orders[0].payment_collections
```
</CodeTab>
@@ -602,7 +602,7 @@ const { data: orders } = await query.graph({
],
})
// orders.promotion
// orders[0].promotion
```
</CodeTab>
@@ -620,7 +620,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.promotion
// orders[0].promotion
```
</CodeTab>
@@ -691,7 +691,7 @@ const { data: orders } = await query.graph({
],
})
// orders.region
// orders[0].region
```
</CodeTab>
@@ -709,7 +709,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.region
// orders[0].region
```
</CodeTab>
@@ -736,7 +736,7 @@ const { data: orders } = await query.graph({
],
})
// orders.sales_channel
// orders[0].sales_channel
```
</CodeTab>
@@ -754,7 +754,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.sales_channel
// orders[0].sales_channel
```
</CodeTab>
@@ -38,7 +38,7 @@ The Payment Module has the following links to other modules:
[PaymentCollection](/references/payment/models/PaymentCollection)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -52,7 +52,7 @@ The Payment Module has the following links to other modules:
[AccountHolder](/references/payment/models/AccountHolder)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#customer-module)
@@ -66,7 +66,7 @@ The Payment Module has the following links to other modules:
[PaymentCollection](/references/payment/models/PaymentCollection)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -80,7 +80,7 @@ The Payment Module has the following links to other modules:
[PaymentCollection](/references/payment/models/PaymentCollection)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -94,7 +94,7 @@ The Payment Module has the following links to other modules:
[PaymentCollection](/references/payment/models/PaymentCollection)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -108,7 +108,7 @@ The Payment Module has the following links to other modules:
[PaymentProvider](/references/payment/models/PaymentProvider)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#region-module)
@@ -142,7 +142,7 @@ const { data: paymentCollections } = await query.graph({
],
})
// paymentCollections.cart
// paymentCollections[0].cart
```
</CodeTab>
@@ -160,7 +160,7 @@ const { data: paymentCollections } = useQueryGraphStep({
],
})
// paymentCollections.cart
// paymentCollections[0].cart
```
</CodeTab>
@@ -236,7 +236,7 @@ const { data: accountHolders } = await query.graph({
],
})
// accountHolders.customer
// accountHolders[0].customer
```
</CodeTab>
@@ -254,7 +254,7 @@ const { data: accountHolders } = useQueryGraphStep({
],
})
// accountHolders.customer
// accountHolders[0].customer
```
</CodeTab>
@@ -328,7 +328,7 @@ const { data: paymentCollections } = await query.graph({
],
})
// paymentCollections.order
// paymentCollections[0].order
```
</CodeTab>
@@ -346,7 +346,7 @@ const { data: paymentCollections } = useQueryGraphStep({
],
})
// paymentCollections.order
// paymentCollections[0].order
```
</CodeTab>
@@ -421,7 +421,7 @@ const { data: paymentProviders } = await query.graph({
],
})
// paymentProviders.regions
// paymentProviders[0].regions
```
</CodeTab>
@@ -439,7 +439,7 @@ const { data: paymentProviders } = useQueryGraphStep({
],
})
// paymentProviders.regions
// paymentProviders[0].regions
```
</CodeTab>
@@ -38,7 +38,7 @@ The Pricing Module has the following links to other modules:
[PriceSet](/references/pricing/models/PriceSet)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -52,7 +52,7 @@ The Pricing Module has the following links to other modules:
[PriceSet](/references/pricing/models/PriceSet)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -86,7 +86,7 @@ const { data: priceSets } = await query.graph({
],
})
// priceSets.shipping_option
// priceSets[0].shipping_option
```
</CodeTab>
@@ -104,7 +104,7 @@ const { data: priceSets } = useQueryGraphStep({
],
})
// priceSets.shipping_option
// priceSets[0].shipping_option
```
</CodeTab>
@@ -183,7 +183,7 @@ const { data: priceSets } = await query.graph({
],
})
// priceSets.variant
// priceSets[0].variant
```
</CodeTab>
@@ -201,7 +201,7 @@ const { data: priceSets } = useQueryGraphStep({
],
})
// priceSets.variant
// priceSets[0].variant
```
</CodeTab>
@@ -38,13 +38,13 @@ Read-only links are used to query data across modules, but the relations aren't
<Table.Body>
<Table.Row>
<Table.Cell>
[Cart](/references/cart/models/Cart) in [Cart Module](../../cart/page.mdx)
[LineItem](/references/cart/models/LineItem) in [Cart Module](../../cart/page.mdx)
</Table.Cell>
<Table.Cell>
[Product](/references/product/models/Product)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[ShippingProfile](/references/fulfillment/models/ShippingProfile) in [Fulfillment Module](../../fulfillment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[InventoryItem](/references/inventory/models/InventoryItem) in [Inventory Module](../../inventory/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#inventory-module)
@@ -80,13 +80,13 @@ Read-only links are used to query data across modules, but the relations aren't
</Table.Row>
<Table.Row>
<Table.Cell>
[Order](/references/order/models/Order) in [Order Module](../../order/page.mdx)
[OrderLineItem](/references/order/models/OrderLineItem) in [Order Module](../../order/page.mdx)
</Table.Cell>
<Table.Cell>
[Product](/references/product/models/Product)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -100,7 +100,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PriceSet](/references/pricing/models/PriceSet) in [Pricing Module](../../pricing/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - one-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#pricing-module)
@@ -114,7 +114,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel) in [Sales Channel Module](../../sales-channel/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#sales-channel-module)
@@ -153,7 +153,7 @@ const { data: lineItems } = await query.graph({
],
})
// lineItems.variant
// lineItems[0].variant
```
</CodeTab>
@@ -171,7 +171,7 @@ const { data: lineItems } = useQueryGraphStep({
],
})
// lineItems.variant
// lineItems[0].variant
```
</CodeTab>
@@ -204,7 +204,7 @@ const { data: products } = await query.graph({
],
})
// products.shipping_profile
// products[0].shipping_profile
```
</CodeTab>
@@ -222,7 +222,7 @@ const { data: products } = useQueryGraphStep({
],
})
// products.shipping_profile
// products[0].shipping_profile
```
</CodeTab>
@@ -305,7 +305,7 @@ const { data: variants } = await query.graph({
],
})
// variants.inventory_items
// variants[0].inventory_items
```
</CodeTab>
@@ -323,7 +323,7 @@ const { data: variants } = useQueryGraphStep({
],
})
// variants.inventory_items
// variants[0].inventory_items
```
</CodeTab>
@@ -403,7 +403,7 @@ const { data: lineItems } = await query.graph({
],
})
// lineItems.variant
// lineItems[0].variant
```
</CodeTab>
@@ -421,7 +421,7 @@ const { data: lineItems } = useQueryGraphStep({
],
})
// lineItems.variant
// lineItems[0].variant
```
</CodeTab>
@@ -454,7 +454,7 @@ const { data: variants } = await query.graph({
],
})
// variants.price_set
// variants[0].price_set
```
</CodeTab>
@@ -472,7 +472,7 @@ const { data: variants } = useQueryGraphStep({
],
})
// variants.price_set
// variants[0].price_set
```
</CodeTab>
@@ -547,7 +547,7 @@ const { data: products } = await query.graph({
],
})
// products.sales_channels
// products[0].sales_channels
```
</CodeTab>
@@ -565,7 +565,7 @@ const { data: products } = useQueryGraphStep({
],
})
// products.sales_channels
// products[0].sales_channels
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Promotion](/references/promotion/models/Promotion)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Promotion](/references/promotion/models/Promotion)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Promotion](/references/promotion/models/Promotion)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -112,7 +112,7 @@ const { data: promotions } = await query.graph({
],
})
// promotions.carts
// promotions[0].carts
```
</CodeTab>
@@ -130,7 +130,7 @@ const { data: promotions } = useQueryGraphStep({
],
})
// promotions.carts
// promotions[0].carts
```
</CodeTab>
@@ -203,7 +203,7 @@ const { data: promotions } = await query.graph({
],
})
// promotions.orders
// promotions[0].orders
```
</CodeTab>
@@ -221,7 +221,7 @@ const { data: promotions } = useQueryGraphStep({
],
})
// promotions.orders
// promotions[0].orders
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Region](/references/region/models/Region)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[Region](/references/region/models/Region)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[PaymentProvider](/references/payment/models/PaymentProvider) in [Payment Module](../../payment/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#payment-module)
@@ -102,7 +102,7 @@ const { data: carts } = await query.graph({
],
})
// carts.region
// carts[0].region
```
</CodeTab>
@@ -120,7 +120,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.region
// carts[0].region
```
</CodeTab>
@@ -147,7 +147,7 @@ const { data: orders } = await query.graph({
],
})
// orders.region
// orders[0].region
```
</CodeTab>
@@ -165,7 +165,7 @@ const { data: orders } = useQueryGraphStep({
],
})
// orders.region
// orders[0].region
```
</CodeTab>
@@ -196,7 +196,7 @@ const { data: regions } = await query.graph({
],
})
// regions.payment_providers
// regions[0].payment_providers
```
</CodeTab>
@@ -214,7 +214,7 @@ const { data: regions } = useQueryGraphStep({
],
})
// regions.payment_providers
// regions[0].payment_providers
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#api-key-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#cart-module)
@@ -72,7 +72,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has one
</Table.Cell>
<Table.Cell>
[Learn more](#order-module)
@@ -86,7 +86,7 @@ Read-only links are used to query data across modules, but the relations aren't
[SalesChannel](/references/sales-channel/models/SalesChannel)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
@@ -100,7 +100,7 @@ Read-only links are used to query data across modules, but the relations aren't
[StockLocation](/references/stock-location/models/StockLocation) in [Stock Location Module](../../stock-location/page.mdx)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#stock-location-module)
@@ -134,7 +134,7 @@ const { data: salesChannels } = await query.graph({
],
})
// salesChannels.publishable_api_keys
// salesChannels[0].publishable_api_keys
```
</CodeTab>
@@ -152,7 +152,7 @@ const { data: salesChannels } = useQueryGraphStep({
],
})
// salesChannels.publishable_api_keys
// salesChannels[0].publishable_api_keys
```
</CodeTab>
@@ -223,7 +223,7 @@ const { data: carts } = await query.graph({
],
})
// carts.sales_channel
// carts[0].sales_channel
```
</CodeTab>
@@ -241,7 +241,7 @@ const { data: carts } = useQueryGraphStep({
],
})
// carts.sales_channel
// carts[0].sales_channel
```
</CodeTab>
@@ -317,7 +317,7 @@ const { data: salesChannels } = await query.graph({
],
})
// salesChannels.products
// salesChannels[0].products
```
</CodeTab>
@@ -335,7 +335,7 @@ const { data: salesChannels } = useQueryGraphStep({
],
})
// salesChannels.products
// salesChannels[0].products
```
</CodeTab>
@@ -410,7 +410,7 @@ const { data: salesChannels } = await query.graph({
],
})
// salesChannels.stock_locations
// salesChannels[0].stock_locations
```
</CodeTab>
@@ -428,7 +428,7 @@ const { data: salesChannels } = useQueryGraphStep({
],
})
// salesChannels.stock_locations
// salesChannels[0].stock_locations
```
</CodeTab>
@@ -44,7 +44,7 @@ Read-only links are used to query data across modules, but the relations aren't
[StockLocation](/references/stock-location/models/StockLocation)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-one
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -58,7 +58,7 @@ Read-only links are used to query data across modules, but the relations aren't
[StockLocation](/references/stock-location/models/StockLocation)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#fulfillment-module)
@@ -66,13 +66,13 @@ Read-only links are used to query data across modules, but the relations aren't
</Table.Row>
<Table.Row>
<Table.Cell>
[Inventory](/references/inventory/models/Inventory) in [Inventory Module](../../inventory/page.mdx)
[InventoryLevel](/references/inventory/models/InventoryLevel) in [Inventory Module](../../inventory/page.mdx)
</Table.Cell>
<Table.Cell>
[StockLocation](/references/stock-location/models/StockLocation)
</Table.Cell>
<Table.Cell>
Stored
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#inventory-module)
@@ -86,7 +86,7 @@ Read-only links are used to query data across modules, but the relations aren't
[StockLocation](/references/stock-location/models/StockLocation)
</Table.Cell>
<Table.Cell>
Stored
Stored - many-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#sales-channel-module)
@@ -130,7 +130,7 @@ const { data: stockLocations } = await query.graph({
],
})
// stockLocations.fulfillment_sets
// stockLocations[0].fulfillment_sets
```
</CodeTab>
@@ -148,7 +148,7 @@ const { data: stockLocations } = useQueryGraphStep({
],
})
// stockLocations.fulfillment_sets
// stockLocations[0].fulfillment_sets
```
</CodeTab>
@@ -219,7 +219,7 @@ const { data: inventoryLevels } = await query.graph({
],
})
// inventoryLevels.stock_locations
// inventoryLevels[0].stock_locations
```
</CodeTab>
@@ -237,7 +237,7 @@ const { data: inventoryLevels } = useQueryGraphStep({
],
})
// inventoryLevels.stock_locations
// inventoryLevels[0].stock_locations
```
</CodeTab>
@@ -268,7 +268,7 @@ const { data: stockLocations } = await query.graph({
],
})
// stockLocations.sales_channels
// stockLocations[0].sales_channels
```
</CodeTab>
@@ -286,7 +286,7 @@ const { data: stockLocations } = useQueryGraphStep({
],
})
// stockLocations.sales_channels
// stockLocations[0].sales_channels
```
</CodeTab>
@@ -38,13 +38,13 @@ Read-only links are used to query data across modules, but the relations aren't
<Table.Body>
<Table.Row>
<Table.Cell>
[Store](/references/store/models/Store)
[StoreCurrency](/references/store/models/StoreCurrency)
</Table.Cell>
<Table.Cell>
[Currency](/references/currency/models/Currency) in [Currency Module](../../currency/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#currency-module)
@@ -59,7 +59,7 @@ Read-only links are used to query data across modules, but the relations aren't
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 [Currency Module](../../currency/page.mdx)'s `Currency` data model and the Store Module's `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](/references/store/models/Currency) data model in the Store Module (not in the Currency Module).
Instead, Medusa defines a read-only link between the [Currency Module](../../currency/page.mdx)'s `Currency` data model and the Store Module's `StoreCurrency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](/references/store/models/Currency) data model in the Store Module (not in the Currency Module).
### Retrieve with Query
@@ -76,7 +76,7 @@ const { data: stores } = await query.graph({
],
})
// stores.supported_currencies
// stores[0].supported_currencies
```
</CodeTab>
@@ -94,7 +94,7 @@ const { data: stores } = useQueryGraphStep({
],
})
// stores.supported_currencies
// stores[0].supported_currencies
```
</CodeTab>