Configuration
Configuration
ObjectQL is configured by passing an ObjectQLConfig object to the constructor.
Basic Layout
Reference
connection (string)
The Connection String URI defining the database connection.
sqlite://path/to/dbpostgres://user:pass@host:5432/dbmongodb://host:27017/db
The engine will automatically load the appropriate driver (@objectql/driver-sql or @objectql/driver-mongo).
modules (string[])
A list of modules to load. A module can be:
- An NPM Package: (e.g.,
@objectql/starter-crm). The loader resolves the package and looks forsrcor root directory files. - A Local Directory: (e.g.,
./src/my-module). The loader scans the directory for schema files (*.object.yml).
This unifies the previous concepts of source, dir and presets.
plugins ((ObjectQLPlugin | string)[])
A list of plugin instances OR package names to extend the core functionality. See Plugin System for details.
objects (Record<string, ObjectConfig>)
(Advanced) In-memory definition of objects. Useful for dynamic runtime schema generation. Objects defined here take highest priority.