docs: rename remoteLink and remoteQueryConfig (#10836)

* docs: rename remoteLink and remoteQueryConfig

* change version number
This commit is contained in:
Shahed Nasser
2025-01-07 14:43:12 +02:00
committed by GitHub
parent f5f4d417c0
commit 38223e5104
28 changed files with 223 additions and 212 deletions
@@ -65,19 +65,19 @@ const { data: apiKeys } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of an API key, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of an API key, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.API_KEY]: {
api_key_id: "apk_123",
},
@@ -121,19 +121,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the order of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the order of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -214,19 +214,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collection of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collection of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -368,19 +368,19 @@ const { data: carts } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotions of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotions of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -77,19 +77,19 @@ const { data: fulfillments } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the order of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the order of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -170,19 +170,19 @@ const { data: shippingOptions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a shipping option, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a shipping option, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.FULFILLMENT]: {
shipping_option_id: "so_123",
},
@@ -273,19 +273,19 @@ const { data: fulfillmentSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock location of a fulfillment set, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock location of a fulfillment set, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.STOCK_LOCATION]: {
stock_location_id: "sloc_123",
},
@@ -70,19 +70,19 @@ const { data: inventoryItems } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the variants of an inventory item, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the variants of an inventory item, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -124,19 +124,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the cart of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the cart of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -225,19 +225,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the fulfillments of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the fulfillments of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -318,19 +318,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collections of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collections of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -463,19 +463,19 @@ const { data: orders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotion of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotion of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -67,19 +67,19 @@ const { data: paymentCollections } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collection of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collection of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -159,19 +159,19 @@ const { data: paymentCollections } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment collections of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment collections of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -252,19 +252,19 @@ const { data: paymentProviders } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment providers in a region, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment providers in a region, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.REGION]: {
region_id: "reg_123",
},
@@ -49,12 +49,12 @@ import {
// ...
// resolve the remote link
const remoteLink = container.resolve(
ContainerRegistrationKeys
// resolve Link
const link = container.resolve(
ContainerRegistrationKeys.LINK
)
remoteLink.create({
link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -66,7 +66,7 @@ remoteLink.create({
<Note title="Tip">
Learn more about the remote link in [this documentation](!docs!/learn/fundamentals/module-links/remote-link).
Learn more about Link in [this documentation](!docs!/learn/fundamentals/module-links/link).
</Note>
@@ -64,19 +64,19 @@ const { data: priceSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a shipping option, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a shipping option, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.FULFILLMENT]: {
shipping_option_id: "so_123",
},
@@ -161,19 +161,19 @@ const { data: priceSets } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -129,19 +129,19 @@ const { data: variants } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the inventory items of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the inventory items of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -278,19 +278,19 @@ const { data: variants } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the price set of a variant, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the price set of a variant, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
variant_id: "variant_123",
},
@@ -371,19 +371,19 @@ const { data: products } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of a product, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of a product, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -77,19 +77,19 @@ const { data: promotions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotions of a cart, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotions of a cart, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -168,19 +168,19 @@ const { data: promotions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the promotion of an order, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the promotion of an order, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.ORDER]: {
order_id: "order_123",
},
@@ -161,19 +161,19 @@ const { data: regions } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the payment providers in a region, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the payment providers in a region, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.REGION]: {
region_id: "reg_123",
},
@@ -73,19 +73,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of an API key, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of an API key, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.API_KEY]: {
api_key_id: "apk_123",
},
@@ -256,19 +256,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the sales channels of a product, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the sales channels of a product, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -349,19 +349,19 @@ const { data: salesChannels } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock locations of a sales channel, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock locations of a sales channel, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.SALES_CHANNEL]: {
sales_channel_id: "sc_123",
},
@@ -82,19 +82,19 @@ const { data: stockLocations } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock location of a fulfillment set, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock location of a fulfillment set, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.STOCK_LOCATION]: {
stock_location_id: "sloc_123",
},
@@ -220,19 +220,19 @@ const { data: stockLocations } = useQueryGraphStep({
</CodeTab>
</CodeTabs>
### Manage with Remote Link
### Manage with Link
To manage the stock locations of a sales channel, use [Remote Link](!docs!/learn/fundamentals/module-links/remote-link):
To manage the stock locations of a sales channel, use [Link](!docs!/learn/fundamentals/module-links/link):
<CodeTabs group="relation-link">
<CodeTab label="remoteLink.create" value="method">
<CodeTab label="link.create" value="method">
```ts
import { Modules } from "@medusajs/framework/utils"
// ...
await remoteLink.create({
await link.create({
[Modules.SALES_CHANNEL]: {
sales_channel_id: "sc_123",
},
+15 -15
View File
@@ -1784,7 +1784,7 @@ export default defineLink(
Then, to set the custom column when creating or updating a link between records:
```ts
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "123",
},
@@ -1819,7 +1819,7 @@ Learn more in [this documentation](!docs!/learn/fundamentals/module-links/custom
### Create Link Between Records
To create a link between two records using remote link:
To create a link between two records using Link:
```ts
import { Modules } from "@medusajs/framework/utils"
@@ -1827,7 +1827,7 @@ import { HELLO_MODULE } from "../../modules/hello"
// ...
await remoteLink.create({
await link.create({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -1837,11 +1837,11 @@ await remoteLink.create({
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#create-link).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#create-link).
### Dismiss Link Between Records
To dismiss links between records using remote link:
To dismiss links between records using Link:
```ts
import { Modules } from "@medusajs/framework/utils"
@@ -1849,7 +1849,7 @@ import { HELLO_MODULE } from "../../modules/hello"
// ...
await remoteLink.dismiss({
await link.dismiss({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
@@ -1859,7 +1859,7 @@ await remoteLink.dismiss({
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#dismiss-link).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#dismiss-link).
### Cascade Delete Linked Records
@@ -1872,14 +1872,14 @@ import { Modules } from "@medusajs/framework/utils"
await productModuleService.deleteVariants([variant.id])
await remoteLink.delete({
await link.delete({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#cascade-delete-linked-records).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#cascade-delete-linked-records).
### Restore Linked Records
@@ -1892,14 +1892,14 @@ import { Modules } from "@medusajs/framework/utils"
await productModuleService.restoreProducts(["prod_123"])
await remoteLink.restore({
await link.restore({
[Modules.PRODUCT]: {
product_id: "prod_123",
},
})
```
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#restore-linked-records).
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/link#restore-linked-records).
---
@@ -3703,13 +3703,13 @@ const paymentCollection =
amount: 5000,
})
// resolve the remote link
const remoteLink = container.resolve(
ContainerRegistrationKeys
// resolve Link
const link = container.resolve(
ContainerRegistrationKeys.LINK
)
// create a link between the cart and payment collection
remoteLink.create({
link.create({
[Modules.CART]: {
cart_id: "cart_123",
},
@@ -85,7 +85,7 @@ Use the `ContainerRegistrationKeys` enum imported from `@medusajs/framework/util
<Table.Row>
<Table.Cell>
Query
[Query](!docs!/learn/fundamentals/module-links/query)
</Table.Cell>
<Table.Cell>
@@ -103,17 +103,17 @@ Use the `ContainerRegistrationKeys` enum imported from `@medusajs/framework/util
<Table.Row>
<Table.Cell>
Remote Link
[Link](!docs!/learn/fundamentals/module-links/link)
</Table.Cell>
<Table.Cell>
The remote link function.
Link function to manage links between records of two modules' data models.
</Table.Cell>
<Table.Cell>
`remoteLink` or `ContainerRegistrationKeys.REMOTE_LINK`
`link` or `ContainerRegistrationKeys.LINK`
</Table.Cell>
</Table.Row>
@@ -671,7 +671,7 @@ Youll test out the workflow in the next section.
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
- [What is the Compensation Function](!docs!/learn/fundamentals/workflows/compensation-function)
- [Learn more about the remote link function](!docs!/learn/fundamentals/module-links/remote-link)
- [Learn more about Link functions](!docs!/learn/fundamentals/module-links/link)
---
@@ -123,14 +123,14 @@ Create workflows to implement these flows, then utilize these workflows in other
## Manage Linked Records
If you've defined links between data models of two modules, you can manage them through two functions: remote link and Query.
If you've defined links between data models of two modules, you can manage them through two tools: Link and Query.
Use the remote link to create a link between two records, and use Query to fetch data across linked data models.
Use Link to create a link between two records, and use Query to fetch data across linked data models.
<CardList itemsPerRow={2} items={[
{
href: "!docs!/learn/fundamentals/module-links/remote-link",
title: "How to Use the Remote Link",
href: "!docs!/learn/fundamentals/module-links/link",
title: "How to Use Link",
text: "Learn how to link data models of different modules.",
icon: AcademicCapSolid,
},
@@ -682,7 +682,7 @@ export const POST = async (
req: AuthenticatedMedusaRequest<RequestType>,
res: MedusaResponse
) => {
const remoteLink = req.scope.resolve("remoteLink")
const link = req.scope.resolve("link")
const marketplaceModuleService: MarketplaceModuleService =
req.scope.resolve(MARKETPLACE_MODULE)
const productModuleService: IProductModuleService = req.scope
@@ -725,7 +725,7 @@ const { result } = await createProductsWorkflow(req.scope)
})
// link product to vendor
await remoteLink.create({
await link.create({
[MARKETPLACE_MODULE]: {
vendor_id: vendorAdmin.vendor.id,
},
@@ -826,7 +826,7 @@ curl 'http://localhost:9000/vendors/products' \
### Further Reads
- [How to use Query](!docs!/learn/fundamentals/module-links/query)
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
- [How to use Link](!docs!/learn/fundamentals/module-links/link)
---
@@ -710,7 +710,7 @@ The workflow returns the created subscription and order.
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
- [Learn more about the compensation function](!docs!/learn/fundamentals/workflows/compensation-function)
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
- [How to use Link](!docs!/learn/fundamentals/module-links/link)
---