Skip to main content
Add a query object to any GET action to filter, sort, or limit the documents returned from Firestore.

Query fields

FieldTypeDescription
attributestringThe document field to filter on.
valuestring | numberThe value to compare against.
operatorstringFirestore comparison operator (see supported operators below).
orderBystringThe field name to sort results by.
order"asc" | "desc"Sort direction.
limitnumberMaximum number of documents to return. Requires operator or order.

Operators

operator accepts any valid Firestore query operator string: ==, !=, <, <=, >, >=, array-contains, in, not-in
The operator string must be a valid Firestore query operator. Passing an unrecognized value will cause the Firestore query to fail at runtime.
Using limit without also setting operator or order throws an error at startup. Always pair limit with at least one of those fields.

Examples

Filter documents where a field matches a specific value.
request: {
  type: "GET",
  query: {
    attribute: "status",
    operator: "==",
    value: "active",
  },
}
This returns all documents where status == "active".