Structure declaration
This is the official documentation of the @forestadmin/agent
Node.js agent.
Creating a custom data source always starts with declaring the structure of the data
Which collections are present?
What fields do they contain?
What are their types?
Columns
Examples
Typing
The typing system for columns is the same as the one used when declaring fields in the agent customization step.
Validation
When using primitive type fields, Forest Admin supports declaring a validation clause, which will be imported into the UI of the admin panel to validate records before creating/updating them.
Relationships
Only intra-data source relationships should be declared at the collection level.
You can declare relationships at the collection level, but that means that the data source you are making is responsible for handling them.
Examples
Typing
The typing system for relationships is the same as the one used when declaring jointures in the agent customization step.
Last updated
Was this helpful?