hasura / hasura/graphql-engine
Computed field filtering doesn't work
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.35.1-cloud2
CLI Version (for CLI related issue): version=2.35.1
### Environment
Cloud
### What is the current behaviour?
I have a computed field in order_tenant table which is `order_tenant_no`. It produced via a simple function :
```
CREATE OR REPLACE FUNCTION public.generate_order_tenant_no(order_item_row order_tenant)
RETURNS text
LANGUAGE sql
STABLE
AS $function$
SELECT to_char(nextval('unique_order_tenant_no_sequence'), 'FM000000') || order_item_row.id::text;
$function$
```
Basically it get id parameter and combine it with uniqe sequence value. I can query it via graphql query but filter does not work.
Here screenshot without filtering, I can query order_tenant_no

It does not work via filtering:

any help or suggestion ?
Contributor guide
Research direction
No repository file or test is named. Start by reproducing the reported GraphQL query with a filter on the order_tenant computed field in Hasura Cloud, then trace how computed fields are handled during filtering. Done means the field remains queryable and filtering returns the expected records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgresql, sql
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100