Option

countBy of query

For whom the calls of the query are counted.

Value

'caller' or 'limits'. Left out, the project's countBy holds.

Example

TypeScript
export const openNotes = query('openNotes', {
  access: allow((user) => user !== undefined),
  rows: notes.where({ body: { contains: 'open' } }).limit(input('limit')),
  countBy: 'caller',
})

See also

word.query