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

[Hasura Cloud - v2.0.0-cloud.6] OR queries not working in Hasura Cloud #6789

Closed
L-U-C-K-Y opened this issue Apr 15, 2021 · 2 comments
Closed

Comments

@L-U-C-K-Y
Copy link

Hi all

I am trying to write an OR query that looks as follows:

query MyQuery {
  guest(where: {_or: {email_code_verified: {_eq: true}, phone_code_verified: {_eq: true}}}) {
    id
  }
}

I would like to get all records where either the email_code_verified or the phone_code_verified is true.

Here a look into the db:

image

I am getting an empty response:

{
  "data": {
    "guest": []
  }
}

In the Analyze I can see that there is an AND instead of an OR:

image

@L-U-C-K-Y
Copy link
Author

The discord community helped me out, Iearned that it is not possible to create such an OR query with the Hasura UI.

Are there any plans to support OR in the UI?

Query:

query MyQuery {
  guest(where: {_or: [{email_code_verified: {_eq: true}}, { phone_code_verified: {_eq: true} }] }) {
    id
  }
}

@L-U-C-K-Y
Copy link
Author

Closing as tracking: #4488 #3322 OneGraph/graphiql-explorer#32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant