listOf
Full name: taxi.stdlib.listOf
Signature
declare function <T> listOf(values:T...):T[]Description
Creates and returns an array containing all the provided values.
This function is useful for creating collections inline without having to define them separately.
// Create a list of allowed status values
find { order: Order } as {
isValidStatus: listOf('PENDING', 'PROCESSING', 'SHIPPED', 'DELIVERED').contains(order.status)
}Examples
Creates an inline collection to check if an order status is one of the valid values.
Try it out
Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed