QUESTPIE
Reference

Query Operators

All query operators per field type.

Text Fields (text, textarea, richText, email, url)

OperatorExampleDescription
equality{ title: "Hello" }Exact match
contains{ title: { contains: "ell" } }Substring match
startsWith{ title: { startsWith: "He" } }Prefix match
endsWith{ title: { endsWith: "lo" } }Suffix match
in{ title: { in: ["A", "B"] } }One of values

Number Fields

OperatorExampleDescription
equality{ price: 1000 }Exact match
gt{ price: { gt: 1000 } }Greater than
gte{ price: { gte: 1000 } }Greater than or equal
lt{ price: { lt: 5000 } }Less than
lte{ price: { lte: 5000 } }Less than or equal
in{ price: { in: [1000, 2000] } }One of values

Boolean Fields

OperatorExampleDescription
equality{ isActive: true }Exact match

Date / DateTime Fields

OperatorExampleDescription
equality{ date: "2025-03-01" }Exact match
gt{ date: { gt: "2025-01-01" } }After
gte{ date: { gte: "2025-01-01" } }On or after
lt{ date: { lt: "2025-12-31" } }Before
lte{ date: { lte: "2025-12-31" } }On or before

Select Fields

OperatorExampleDescription
equality{ status: "published" }Exact match
in{ status: { in: ["draft", "published"] } }One of values

Relation Fields

OperatorExampleDescription
equality{ author: "user-id" }Match by ID

Combining Operators

Multiple fields use AND logic:

where: {
  status: "published",
  price: { gte: 1000 },
  createdAt: { gte: "2025-01-01" },
}
// status = published AND price >= 1000 AND createdAt >= 2025-01-01

Multiple operators on the same field use AND:

where: {
  price: { gte: 1000, lt: 5000 },
}
// 1000 <= price < 5000

On this page