Filtered List Queries
You can filter your query results. In the following examples, we have a table called students, which contains fields and relations like createdAt, firstName, email, age.
Using Filters in Queries
Section titled “Using Filters in Queries”Query list of records that are filtered. Notice the filter argument.
Request
query MyQuery1 { students( filter: { createdAt: { gt: "2025-12-01T13:00:00.000Z" }, email: { contains: "williams" } } ) { items { id createdAt firstName email } }}Response
{ "data": { "students": { "items": [ { "id": "97fb89ac-e0ad-44f5-b671-24a1b751287c", "createdAt": "2025-12-02T05:03:17.180675Z", "firstName": "John", "email": "john.williams@example.com" }, { "id": "e25c4955-7ea7-4a83-a3de-d4c7427cc9fa", "createdAt": "2025-12-04T14:18:15.955194Z", "firstName": "Robert", "email": "robert.williams@example.com" } ] } }}Conditional Filters
Section titled “Conditional Filters”Conditional filters use the AND and OR keys.
Using AND
Section titled “Using AND”When AND is specified, all filter objects must return truthy.
Request
query MyQuery1 { students( filter: { AND: { email: { contains: "johnson" }, isActive: { not_equals: false } } } ) { items { id createdAt firstName email isActive } }}Response
{ "data": { "students": { "items": [ { "id": "13fcb5bf-a8a4-4e55-860f-74f425944ec0", "createdAt": "2025-12-04T20:30:58.586321Z", "firstName": "Mary", "email": "mary.johnson@example.com", "isActive": true } ] } }}Using OR
Section titled “Using OR”When OR is specified, at least one filter object must return truthy.
Request
query MyQuery1 { students( filter: { OR: { firstName: { equals: "Mary" }, lastName: { equals: "Williams" } } } ) { items { id createdAt firstName email isActive } }}Response