docs: improvements to module and data model documentation (#8062)
* docs: improvements to module and data model documentation * add note about data model name casing
This commit is contained in:
@@ -18,6 +18,18 @@ A module link forms an association between two data models of different modules,
|
||||
|
||||
You can then retrieve data across the linked modules, and manage their linked records.
|
||||
|
||||
<Note title="Use module links when" type="success">
|
||||
|
||||
- You want to create a relation between data models from different modules.
|
||||
|
||||
</Note>
|
||||
|
||||
<Note title="Don't use module links if" type="error">
|
||||
|
||||
- You want to create a relationship between data models in the same module. Use data model relationships instead.
|
||||
|
||||
</Note>
|
||||
|
||||
---
|
||||
|
||||
## Prerequisite: isQueryable Configuration
|
||||
@@ -27,10 +39,13 @@ Before you define a module link, you must enable the `isQueryable` configuration
|
||||
For example:
|
||||
|
||||
```js
|
||||
import { HELLO_MODULE } from "./src/modules/hello"
|
||||
// ...
|
||||
|
||||
module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
helloModuleService: {
|
||||
[HELLO_MODULE]: {
|
||||
resolve: "./modules/hello",
|
||||
definition: {
|
||||
isQueryable: true,
|
||||
|
||||
Reference in New Issue
Block a user