Using Filters

Filtering allows you to restrict the content shown by specific parameters. This is helpful when trying to create a more curated overview of content.

These filters can be useful when building content views, looking for a specific type of content, or finding content that matches several perimeters (such as Created after AND Content ID).

Filtering by EntryAnchor

You can find the filters on any content view right at the top. If there are no filters added, this is how it will look like:

Filter Bar
Filter Bar

After you applied a filter, for example for a DateTime field, you can add more filters with the "plus" icon or Clear filters.

Apply a Filter
Apply a Filter

Additionally, you can also filter by fields that allow multiple values. Here's an example for a dropdown field:

Multi-value enum filtering
Multi-value enum filtering

  1. Navigate to the content tab in the left-hand sidebar.
  2. Choose a content model from the collapsible sidebar.
  3. Press the Filter icon at the end of the filter bar at the top of the content entries table.
  4. Choose from one of the fields listed for filtering.
  5. Select the filter method in the center of the filter box (default's to contains).
  6. Choose from one of the following options:
Option
IsExact match
Is NullMatches empty (without content)
Is Not NullMatches not null (with any content added)
Is NotExclusion match
Less Thanfor numeric fields (including date and dateTime)
Less Than or Equal Tofor numeric fields (including date and dateTime)
Greater Thanfor numeric fields (including date and dateTime)
Greater Than or Equal Tofor numeric fields (including date and dateTime)
ContainsString search
Not ContainsExclusion by string search
Starts WithStarting string match
Not Starts WithExclusion by starting string match
Ends WithEnding string match
Not Ends WithExclusion by ending string match
Includes somefor multi-value fields, some of the provided values match
Includes allfor multi-value fields, all of the provided values match
Includes nonefor multi-value fields, none of the provided values match
  1. To the right of the filter method, enter a comparison value.

Filtering by RelationsAnchor

In order to filter your content entries by a relational field, click the +Filter button and select one of the referenced models.

Then, select the field of this model that you want to filter for, as well as the condition.

Finally, add the search term you're interested in, or select the value from a dropdown.

As an example, you will be able to build a filtering condition like this: Show all of the content entries where the Title of the referenced Category is exactly General.

Screenshot of Filtering by Relations in Hygraph
Screenshot of Filtering by Relations in Hygraph

Please note that it is not possible to filter by union-type reference fields - those that allow you to reference more than one model in a field. For instance, Staff reference field with Players and Coaches models referenced in the Team parent model.

Did you find this page useful?

Your feedback helps us improve our docs, and product.