Service providers can tell consumers what type of functionality they can support through the allow method on a data source.

The allow().discover property lets consumers know that the service provider will allow meta data to be retrieved from the data service.

In the example below, an application checks whether the service provider will allow discovery and then asks the data service for a list of fields on the sales table.

const accountService = new"table", {
    Provider: {
        Server: "query-server"

if(accountService.allow().discover) {
    const options = { table: "sales" };
    const entities = await accountService.discoverFieldsAsync(options);

For a full list of discovery methods, visit the reference . For a full list of allow attributes supported by a service provider, visit the service provider documentation.

Last updated