profile
viewpoint

Ask questionsThrow 400 on missing filter value

  1. Filters works OK, when they were passed:

2021-03-11_13-02-06

  1. But query has errors, when no arguments passed for filters:

Снимок экрана 2021-03-11 в 13 03 53

  1. Neither with _in, nor with _eq

Снимок экрана 2021-03-11 в 13 04 17

query getArticleListWithFilters($cat_id: ID) {
  items {
    article(filter: {categories: {id: {_eq: $cat_id}}}) {
      id
      status
      date_created
      date_updated
      categories {
        id
        category {
          name
        }
      }
    }
  }
}

MariaDB dump: dump-2.sql.zip

Project details

Directus Version: 9.0.0-rc.46 Environment: production OS: Linux 5.4.0-65-generic Node: 14.16.0

directus/directus

Answer questions iksent

Something else is wrong...

I am getting not all Articles, but only those, which have Categories. This is for my previous query also (https://github.com/directus/directus/issues/4471#issuecomment-828670002)

I have checked, that this filter (with [undefined] value) is ignoring now, but something else is filtering Articles... Can it be something inside addWhereClauses or addJoins?

useful!
source:https://uonfu.com/
answerer
Ilya Belousov iksent Russia, Chelyabinsk React / Next / Gatsby / Headless CMS / Design
Github User Rank List