Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_is_null for views #1564

Closed
Sorix opened this issue Feb 5, 2019 · 1 comment
Closed

_is_null for views #1564

Sorix opened this issue Feb 5, 2019 · 1 comment
Labels
c/docs Related to docs

Comments

@Sorix
Copy link

Sorix commented Feb 5, 2019

It is possible to create manual views that may be nil (e.g. object that may reference to your table). But there is no way to check that view with _is_null in where condition clause.

{
  article(where: {
    author: {
      # That currently is not possible, we can check againts subitems only for view here
      # There is no way to check if it is null
      # Even if we check author.name == NULL, that check won't be executed
      _is_null: true
    }
  }) {
    author {
      name
    }
}
@praveenweb praveenweb added the c/server Related to server label Feb 6, 2019
@0x777
Copy link
Member

0x777 commented Feb 6, 2019

This is how you check if 'there exists an author':

{
  article(where: {
    author: {}
  }) {
    author {
      name
    }
}

I you want to fetch articles which don't have an author:

{
  article(where: {
    _not: {author: {}}
  }) {
    author {
      name
    }
}

@0x777 0x777 added c/docs Related to docs and removed c/server Related to server labels Feb 6, 2019
@Sorix Sorix closed this as completed Feb 10, 2019
hasura-bot added a commit that referenced this issue Jun 14, 2021
GITHUB_PR_NUMBER: 5713
GITHUB_PR_URL: #5713

hasura/graphql-engine-mono#1564

Co-authored-by: Sameer Kolhar <[email protected]>
Co-authored-by: Kali Vara Purushotham Santhati <[email protected]>
GitOrigin-RevId: b4441cb
hasura-bot pushed a commit that referenced this issue Jun 14, 2021
hasura-bot pushed a commit that referenced this issue Jan 24, 2025
<!-- The PR description should answer 2 important questions: -->

### What

Update changelog to release `v2025.01.24`

V3_GIT_ORIGIN_REV_ID: 09d11d4d7d88c97f8ac8cb6ee258fbe49441ad69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/docs Related to docs
Projects
None yet
Development

No branches or pull requests

3 participants