docs: change config snippets to use defineConfig (#7546)
This commit is contained in:
@@ -209,22 +209,24 @@ This creates a relationship to the `Product` data model of the Product Module us
|
||||
|
||||
### 2. Adjust Module Configuration
|
||||
|
||||
To use relationships in a module, adjust its configuration object passed to the `modules` object in `medusa-config.js`:
|
||||
To use relationships in a module, adjust its configuration object passed to `modules` in `medusa-config.js`:
|
||||
|
||||
export const configHighlights = [
|
||||
["7", "isQueryable", "Enable this property to use relationships in a module."]
|
||||
]
|
||||
|
||||
```js title="medusa-config.js" highlights={configHighlights}
|
||||
const modules = {
|
||||
helloModuleService: {
|
||||
// ...
|
||||
definition: {
|
||||
isQueryable: true,
|
||||
},
|
||||
},
|
||||
module.exports = defineConfig({
|
||||
// ...
|
||||
}
|
||||
modules: {
|
||||
helloModuleService: {
|
||||
// ...
|
||||
definition: {
|
||||
isQueryable: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Enabling the `isQueryable` property is required to use relationships in a module.
|
||||
|
||||
@@ -23,15 +23,18 @@ To pass options to a module, add an `options` property to the module’s configu
|
||||
For example:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const modules = {
|
||||
helloModuleService: {
|
||||
resolve: "./dist/modules/hello",
|
||||
options: {
|
||||
capitalize: true,
|
||||
},
|
||||
},
|
||||
module.exports = defineConfig({
|
||||
// ...
|
||||
}
|
||||
modules: {
|
||||
helloModuleService: {
|
||||
resolve: "./modules/hello",
|
||||
options: {
|
||||
capitalize: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
The `options` property’s value is an object. You can pass any properties you want.
|
||||
|
||||
Reference in New Issue
Block a user