Collection selection
const { createAgent } = require('@forestadmin/agent');
const { createSqlDataSource } = require('@forestadmin/datasource-sql');
const agent = createAgent(options);
const aDataSource = createSqlDataSource(
'postgres://user:pass@localhost:5432/mySchema',
);
const anotherDataSource = createSqlDataSource(
'postgres://user:pass@localhost:5432/myOtherSchema',
);
// Specify which collections you want to play with
agent
.addDataSource(aDataSource, { include: ['books', 'reviews'] })
.addDataSource(anotherDataSource, { exclude: ['authors'] });Last updated