hasura / hasura/graphql-engine

Unable to aggregate condition inside where.

Open
#8,395 0 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information
V2.1.0

### Environment
Docker in local machine

### What is the expected behaviour?

I am querying one view with it's relation and wants a condition that the array relation must have more than 10 count like.

```gql
query MyQuery {
events_view(where: {chatters_aggregate: { aggregate: { count: { _gt:10 } } }}) {
event_id
}
}
```
Here my `events_view` has an array relation with the `chatters`. It's one to many relationship. I did look into the documents and I don't see anything is wrong here but I am still having this error. I am referring to this [document](https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/query-filters/#fetch-if-aggregate-value-of-the-returned-table-rows-by-the-computed-field-satisfies-a-condition)

### What is the current behaviour?

Currently when I am trying to perform this query even within the hasura console, It give me an error like:
`field \"chatters_aggregate\" not found in type: 'events_view_bool_exp'`

### Screenshots or Screencast
![image](https://user-images.githubusercontent.com/97947373/163176118-344c4110-7017-4407-9794-4dfce4be6926.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.