# Filtering records

You can supply different parameters to the `filter` argument to filter the query response accordingly. The available options depend on the fields defined on the model in question.

If you supply exactly one parameter to the filter argument, the query response will only contain records that fulfill this constraint:

```graphql
query {
  allArtists(
    filter: {
      published: { eq: false }
    }
  ) {
    id
    name
    published
  }
}
```

Depending on the type of the field you want to filter by, you have access to different advanced criteria you can use to filter your query response:

```graphql
query {
  allArtists(
    filter: {
      name: { in: [ "Blank Banshee", "Gazelle Twin" ] }
    }
  ) {
    id
    name
    genre
  }
}
```

If you specify multiple conditions, they will be combined as if it was a logical AND expression:

```graphql
query {
  allAlbums(
    filter: {
      { artist: { eq: "212" } },
      { releaseDate: { gt: "2016-01-01" } }
    }
  ) {
    id
    slug
    artist { name }
    coverImage { url }
  }
}
```

There are times where it can be more convenient to use an AND expression explicitly, for example when you need to use the same type of filter more than once:

```graphql
query {
  allArtists(
    filter: {
      AND: [
        { name: { matches: { pattern: "Blank" } } },
        { name: { matches: { pattern: "Banshee" } } }
      ]
    }
  ) {
    id
    name
    genre
  }
}
```

It is also possible to combine AND-like and OR logical expressions. For example, the following query will return all the point of interest located in New York that either have a rating greater than 4 or are a restaurant:

```graphql
query {
  allPois(
    filter: {
      address: { matches: { pattern: "new york" } },
      OR: [
        { rating: { gt: 4 } },
        { name: { matches: { pattern: "restaurant" } } },
      ]
    }
  ) {
    name
    address
    rating
  }
}
```

> [!WARNING] Structured Text and Deep Filtering
> If a Structured Text field has the [deep filtering](https://www.datocms.com/docs/content-delivery-api/deep-filtering.md) option enabled, its filters will slightly differ from the ones described in this page. You learn more in the next section of the doc regarding [deep filtering](https://www.datocms.com/docs/content-delivery-api/deep-filtering.md).

## Filters available for field types

#### Boolean fields

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { booleanField: { eq: true } }) {
    title
  }
}
```

#### Color fields

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { colorField: { exists: true } }) {
    title
  }
}
```

#### Date fields

`gt`

Filter records with a value that's strictly greater than the one specified

```graphql
query {
  allProducts(filter: { dateField: { gt: "2018-02-13" } }) {
    title
  }
}
```

`lt`

Filter records with a value that's less than the one specified

```graphql
query {
  allProducts(filter: { dateField: { lt: "2018-02-13" } }) {
    title
  }
}
```

`gte`

Filter records with a value that's greater than or equal to the one specified

```graphql
query {
  allProducts(filter: { dateField: { gte: "2018-02-13" } }) {
    title
  }
}
```

`lte`

Filter records with a value that's less or equal than the one specified

```graphql
query {
  allProducts(filter: { dateField: { lte: "2018-02-13" } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { dateField: { exists: true } }) {
    title
  }
}
```

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { dateField: { eq: "2018-02-13" } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { dateField: { neq: "2018-02-13" } }) {
    title
  }
}
```

#### DateTime fields

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      dateTimeField: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { dateTimeField: { exists: true } }) {
    title
  }
}
```

#### Single file fields

`eq`

Search for records with an exact match. The specified value must be an Upload ID

```graphql
query {
  allProducts(filter: { fileField: { eq: "123" } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match. The specified value must be an Upload ID

```graphql
query {
  allProducts(filter: { fileField: { neq: "123" } }) {
    title
  }
}
```

`in`

Filter records that have one of the specified uploads

```graphql
query {
  allProducts(filter: { fileField: { in: ["123"] } }) {
    title
  }
}
```

`not_in`

Filter records that do not have one of the specified uploads

```graphql
query {
  allProducts(filter: { fileField: { notIn: ["123"] } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { fileField: { exists: true } }) {
    title
  }
}
```

#### Floating-point number fields

`gt`

Filter records with a value that's strictly greater than the one specified

```graphql
query {
  allProducts(filter: { floatField: { gt: 19.99 } }) {
    title
  }
}
```

`lt`

Filter records with a value that's less than the one specified

```graphql
query {
  allProducts(filter: { floatField: { lt: 19.99 } }) {
    title
  }
}
```

`gte`

Filter records with a value that's greater than or equal to the one specified

```graphql
query {
  allProducts(filter: { floatField: { gte: 19.99 } }) {
    title
  }
}
```

`lte`

Filter records with a value that's less or equal than the one specified

```graphql
query {
  allProducts(filter: { floatField: { lte: 19.99 } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { floatField: { exists: true } }) {
    title
  }
}
```

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { floatField: { eq: 19.99 } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { floatField: { neq: 19.99 } }) {
    title
  }
}
```

#### Multiple files fields

`eq`

Search for records with an exact match. The specified values must be Upload IDs

```graphql
query {
  allProducts(filter: { galleryField: { eq: ["123"] } }) {
    title
  }
}
```

`all_in`

Filter records that have all of the specified uploads. The specified values must be Upload IDs

```graphql
query {
  allProducts(filter: { galleryField: { allIn: ["123"] } }) {
    title
  }
}
```

`any_in`

Filter records that have one of the specified uploads. The specified values must be Upload IDs

```graphql
query {
  allProducts(filter: { galleryField: { anyIn: ["123"] } }) {
    title
  }
}
```

`not_in`

Filter records that do not have any of the specified uploads. The specified values must be Upload IDs

```graphql
query {
  allProducts(filter: { galleryField: { notIn: ["123"] } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { galleryField: { exists: true } }) {
    title
  }
}
```

#### Integer number fields

`gt`

Filter records with a value that's strictly greater than the one specified

```graphql
query {
  allProducts(filter: { integerField: { gt: 3 } }) {
    title
  }
}
```

`lt`

Filter records with a value that's less than the one specified

```graphql
query {
  allProducts(filter: { integerField: { lt: 3 } }) {
    title
  }
}
```

`gte`

Filter records with a value that's greater than or equal to the one specified

```graphql
query {
  allProducts(filter: { integerField: { gte: 3 } }) {
    title
  }
}
```

`lte`

Filter records with a value that's less or equal than the one specified

```graphql
query {
  allProducts(filter: { integerField: { lte: 3 } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { integerField: { exists: true } }) {
    title
  }
}
```

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { integerField: { eq: 3 } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { integerField: { neq: 3 } }) {
    title
  }
}
```

#### JSON fields

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { jsonField: { exists: true } }) {
    title
  }
}
```

#### Geolocation fields

`near`

Filter records within the specified radius in meters

```graphql
query {
  allProducts(
    filter: {
      latLonField: {
        near: { latitude: 40.73, longitude: -73.93, radius: 10 }
      }
    }
  ) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { latLonField: { exists: true } }) {
    title
  }
}
```

#### Single link fields

`eq`

Search for records with an exact match. The specified value must be a Record ID

```graphql
query {
  allProducts(filter: { linkField: { eq: "123" } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match. The specified value must be a Record ID

```graphql
query {
  allProducts(filter: { linkField: { neq: "123" } }) {
    title
  }
}
```

`in`

Filter records linked to one of the specified records

```graphql
query {
  allProducts(filter: { linkField: { in: ["123"] } }) {
    title
  }
}
```

`not_in`

Filter records not linked to one of the specified records

```graphql
query {
  allProducts(filter: { linkField: { notIn: ["123"] } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { linkField: { exists: true } }) {
    title
  }
}
```

#### Multiple links fields

`eq`

Search for records with an exact match. The specified values must be Record IDs

```graphql
query {
  allProducts(filter: { linksField: { eq: ["123"] } }) {
    title
  }
}
```

`all_in`

Filter records linked to all of the specified records. The specified values must be Record IDs

```graphql
query {
  allProducts(filter: { linksField: { allIn: ["123"] } }) {
    title
  }
}
```

`any_in`

Filter records linked to at least one of the specified records. The specified values must be Record IDs

```graphql
query {
  allProducts(filter: { linksField: { anyIn: ["123"] } }) {
    title
  }
}
```

`not_in`

Filter records not linked to any of the specified records. The specified values must be Record IDs

```graphql
query {
  allProducts(filter: { linksField: { notIn: ["123"] } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { linksField: { exists: true } }) {
    title
  }
}
```

#### SEO meta tags fields

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { seoField: { exists: true } }) {
    title
  }
}
```

#### Slug fields

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { slugField: { eq: "bike" } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { slugField: { neq: "bike" } }) {
    title
  }
}
```

`in`

Filter records that have one of the specified slugs

```graphql
query {
  allProducts(filter: { slugField: { in: ["bike"] } }) {
    title
  }
}
```

`not_in`

Filter records that do have one of the specified slugs

```graphql
query {
  allProducts(filter: { slugField: { notIn: ["bike"] } }) {
    title
  }
}
```

#### Single-line string fields

`matches`

Filter records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      stringField: {
        matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`not_matches`

Exclude records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      stringField: {
        notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`is_blank`

Filter records with the specified field set as blank (null or empty string)

```graphql
query {
  allProducts(filter: { stringField: { isBlank: true } }) {
    title
  }
}
```

`is_present`

Filter records with the specified field present (neither null, nor empty string)

```graphql
query {
  allProducts(filter: { stringField: { isPresent: true } }) {
    title
  }
}
```

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { stringField: { eq: "bike" } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { stringField: { neq: "bike" } }) {
    title
  }
}
```

`in`

Filter records that equal one of the specified values

```graphql
query {
  allProducts(filter: { stringField: { in: ["bike"] } }) {
    title
  }
}
```

`not_in`

Filter records that do not equal one of the specified values

```graphql
query {
  allProducts(filter: { stringField: { notIn: ["bike"] } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not \[DEPRECATED\]

```graphql
query {
  allProducts(filter: { stringField: { exists: true } }) {
    title
  }
}
```

#### Structured text fields

`matches`

Filter records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      structuredTextField: {
        matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`not_matches`

Exclude records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      structuredTextField: {
        notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`is_blank`

Filter records with the specified field set as blank (null or single empty paragraph)

```graphql
query {
  allProducts(filter: { structuredTextField: { isBlank: true } }) {
    title
  }
}
```

`is_present`

Filter records with the specified field present (neither null, nor empty string)

```graphql
query {
  allProducts(filter: { structuredTextField: { isPresent: true } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not \[DEPRECATED\]

```graphql
query {
  allProducts(filter: { structuredTextField: { exists: true } }) {
    title
  }
}
```

#### Multiple-paragraph text fields

`matches`

Filter records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      textField: {
        matches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`not_matches`

Exclude records based on a regular expression

```graphql
query {
  allProducts(
    filter: {
      textField: {
        notMatches: { pattern: "bi(cycl|k)e", caseSensitive: false }
      }
    }
  ) {
    title
  }
}
```

`is_blank`

Filter records with the specified field set as blank (null or empty string)

```graphql
query {
  allProducts(filter: { textField: { isBlank: true } }) {
    title
  }
}
```

`is_present`

Filter records with the specified field present (neither null, nor empty string)

```graphql
query {
  allProducts(filter: { textField: { isPresent: true } }) {
    title
  }
}
```

`exists`

Filter records with the specified field defined (i.e. with any value) or not \[DEPRECATED\]

```graphql
query {
  allProducts(filter: { textField: { exists: true } }) {
    title
  }
}
```

#### Video fields

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { videoField: { exists: true } }) {
    title
  }
}
```

### Filters available for meta fields

#### Filter by `_createdAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _createdAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _createdAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `_firstPublishedAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _firstPublishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _firstPublishedAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `_isValid` meta field

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { _isValid: { eq: true } }) {
    title
  }
}
```

#### Filter by `_publicationScheduledAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publicationScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _publicationScheduledAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `_publishedAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _publishedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _publishedAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `_status` meta field

`eq`

Search the record with the specified status

```graphql
query {
  allProducts(filter: { _status: { eq: draft } }) {
    title
  }
}
```

`neq`

Exclude the record with the specified status

```graphql
query {
  allProducts(filter: { _status: { neq: draft } }) {
    title
  }
}
```

`in`

Search records with the specified statuses

```graphql
query {
  allProducts(filter: { _status: { in: [draft] } }) {
    title
  }
}
```

`not_in`

Search records without the specified statuses

```graphql
query {
  allProducts(filter: { _status: { notIn: [draft] } }) {
    title
  }
}
```

#### Filter by `_unpublishingScheduledAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _unpublishingScheduledAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _unpublishingScheduledAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `_updatedAt` meta field

`gt`

Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lt`

Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lt: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`gte`

Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        gte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`lte`

Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        lte: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`eq`

Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        eq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`neq`

Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument.

```graphql
query {
  allProducts(
    filter: {
      _updatedAt: {
        # Value is truncated to the minute: "2018-02-13T14:30:00+00:00"
        neq: "2018-02-13T14:30:13+00:00"
      }
    }
  ) {
    title
  }
}
```

> [!NOTE] Filtering adjacent records
> Truncation to the nearest minute may cause filters to return unintended records (e.g., `gt: "2025-05-06T09:36:01+02:00"` becomes `gt: "2025-05-06T09:36:00+02:00"` and unexpectedly includes records at `2025-05-06T09:36:01+02:00`).
> 
> Add an additional filter condition (like `slug: {neq: $slug}` in the example below) to ensure unintended records are excluded from the results:
> 
> ```graphql
> query NextArticle($slug: String, $firstPublishedAt: DateTime) {
>   next: article(
>     orderBy: _firstPublishedAt_ASC
>     filter: {
>       _firstPublishedAt: {gt: $firstPublishedAt},
>       slug: {neq: $slug}
>     }
>   ) {
>     title
>     _firstPublishedAt
>   }
> }
> ```

`exists`

Filter records with the specified field defined (i.e. with any value) or not

```graphql
query {
  allProducts(filter: { _updatedAt: { exists: true } }) {
    title
  }
}
```

#### Filter by `id` meta field

`eq`

Search the record with the specified ID

```graphql
query {
  allProducts(filter: { id: { eq: "123" } }) {
    title
  }
}
```

`neq`

Exclude the record with the specified ID

```graphql
query {
  allProducts(filter: { id: { neq: "123" } }) {
    title
  }
}
```

`in`

Search records with the specified IDs

```graphql
query {
  allProducts(filter: { id: { in: ["123"] } }) {
    title
  }
}
```

`not_in`

Search records that do not have the specified IDs

```graphql
query {
  allProducts(filter: { id: { notIn: ["123"] } }) {
    title
  }
}
```

#### Filter by `parent` meta field

`eq`

Filter records children of the specified record. Value must be a Record ID

```graphql
query {
  allProducts(filter: { parent: { eq: "123" } }) {
    title
  }
}
```

`exists`

Filter records with a parent record or not

```graphql
query {
  allProducts(filter: { parent: { exists: true } }) {
    title
  }
}
```

#### Filter by `position` meta field

`gt`

Filter records with a value that's strictly greater than the one specified

```graphql
query {
  allProducts(filter: { position: { gt: 3 } }) {
    title
  }
}
```

`lt`

Filter records with a value that's less than the one specified

```graphql
query {
  allProducts(filter: { position: { lt: 3 } }) {
    title
  }
}
```

`gte`

Filter records with a value that's greater than or equal to the one specified

```graphql
query {
  allProducts(filter: { position: { gte: 3 } }) {
    title
  }
}
```

`lte`

Filter records with a value that's less or equal than the one specified

```graphql
query {
  allProducts(filter: { position: { lte: 3 } }) {
    title
  }
}
```

`eq`

Search for records with an exact match

```graphql
query {
  allProducts(filter: { position: { eq: 3 } }) {
    title
  }
}
```

`neq`

Exclude records with an exact match

```graphql
query {
  allProducts(filter: { position: { neq: 3 } }) {
    title
  }
}
```

## Related content in "Content Delivery API"

- [Content Delivery API Overview](https://www.datocms.com/docs/content-delivery-api.md)
- [Using the JavaScript CDA client](https://www.datocms.com/docs/content-delivery-api/your-first-request.md)
- [Authentication and permissions](https://www.datocms.com/docs/content-delivery-api/authentication.md)
- [Configuring requests: envs, drafts, strict mode, cache tags, etc.](https://www.datocms.com/docs/content-delivery-api/api-endpoints.md)
- [How to fetch records](https://www.datocms.com/docs/content-delivery-api/how-to-fetch-records.md)
- [Filtering records](https://www.datocms.com/docs/content-delivery-api/filtering-records.md)
- [Deep Filtering](https://www.datocms.com/docs/content-delivery-api/deep-filtering.md)
- [Ordering records](https://www.datocms.com/docs/content-delivery-api/ordering-records.md)
- [Pagination](https://www.datocms.com/docs/content-delivery-api/pagination.md)
- [Localization](https://www.datocms.com/docs/content-delivery-api/localization.md)
- [Direct vs. Inverse relationships](https://www.datocms.com/docs/content-delivery-api/inverse-relationships.md)
- [Hierarchical sorting (Tree-like collections)](https://www.datocms.com/docs/content-delivery-api/hierarchical-sorting.md)
- [Modular content fields](https://www.datocms.com/docs/content-delivery-api/modular-content-fields.md)
- [Structured text fields](https://www.datocms.com/docs/content-delivery-api/structured-text-fields.md)
- [Images and videos](https://www.datocms.com/docs/content-delivery-api/images-and-videos.md)
- [Filtering uploads](https://www.datocms.com/docs/content-delivery-api/filtering-uploads.md)
- [SEO and favicon fields](https://www.datocms.com/docs/content-delivery-api/seo-and-favicon.md)
- [Meta fields](https://www.datocms.com/docs/content-delivery-api/meta-fields.md)
- [Cache Tags Overview](https://www.datocms.com/docs/content-delivery-api/cache-tags.md)
- [Cache tags in CDA responses](https://www.datocms.com/docs/content-delivery-api/cache-tags-format.md)
- [The cache tags invalidation webhook](https://www.datocms.com/docs/content-delivery-api/cache-tags-invalidation.md)
- [Integrating cache tags in your project](https://www.datocms.com/docs/content-delivery-api/cache-tags-integrations.md)
- [Error codes & handling failures (CDA)](https://www.datocms.com/docs/content-delivery-api/errors.md)
- [CDA Technical Limits & Rate Limits](https://www.datocms.com/docs/content-delivery-api/technical-limits.md)
- [Complexity](https://www.datocms.com/docs/content-delivery-api/complexity.md)
- [Custom Scalar Types](https://www.datocms.com/docs/content-delivery-api/custom-scalar-types.md)
- [Changelog](https://www.datocms.com/docs/content-delivery-api/changelog.md)