Query filters
Learn how to narrow down your GraphQL searches using Bunny's filters.
Bunny's GraphQL API follows standard practices and allows you to use first
, limit
, cursors etc. But filters make it possible to get very specific in a simple way.
The admin UI's table filters give a good idea of what's possible as they are using the GraphQL filters. You can search for ranges, relative dates and much more. For example:
You can also combine conditions.
The operators vary by data type.
Boolean
is, is_not
Integer
<. >, =, <=, =>, !=, in [ ], not in [ ]
String
begins_with, ends_with, contains, contains_not, equals, not_equals, !=, =, in [ ], not in [ ]
You can also test for null values using is blank
and is not blank
.
Dates
Dates have the most complex syntax and are best explained in the simplified grammar below.
The date syntax is very powerful and allows you to easily express relative times, such as:
in three weeks
last month
is current week
on or after '2024-10-10'
next quarter
Grouping
The filter syntax also allows you do group expressions using parenthesis and combine them with and
and or
, for example:
Last updated
Was this helpful?