Filtering

Updated June 10, 2021 6:04 PM

NotionQL allows you to pass a filter argument to your GraphQL queries. The filter arguments uses the same filter structure as the Notion API. You can view the Notion API documentation to learn more about how to structure the filter argument.

NotionQL supports both Database Property Filters and Compound Filters.

Database Property Filters

When using a Database Property Filter, the value of the property key must be the unsanitized format of the property you are filtering on.

For example, if you property name in your Notion Database is Last Updated, then you would pass property: "Last Updated" to your filter.

Compound Filters

NotionQL supports Compound Filters with the same limitations as the Notion API. Compound Filters can be combined within a Compound Filter but only up to two nesting levels deep.