schema

schema.values

values(key: string, opts: object): unknown[]

Up to limit distinct values for a property key.

Stops scanning early once limit distinct values have been collected.

keystringThe property key to sample.
optsobject

Returns: unknown[]

Example

const roles = api.schema.values("role");
// ["Admin", "User", "Viewer"]