graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

support column operators _ceq in graphql api

Open coco98 opened this issue 7 years ago • 9 comments

https://docs.hasura.io/1.0/graphql/manual/api-reference/graphql-api/query.html#columnexp

(Via @jrhicks on discord)

coco98 avatar Sep 14 '18 20:09 coco98

@coco98 They are not supported in the graphql interface yet.

0x777 avatar Sep 17 '18 09:09 0x777

@0x777 Why is this hard?

lexi-lambda avatar Feb 28 '20 06:02 lexi-lambda

I'd like to upvote this feature. Currently I have to use sequelize and APIs to accomodate this all-to-common need.
select * from table where column1 > column2;
... wish there was a way to do this in graphql where clause.

ice0136 avatar Mar 31 '20 14:03 ice0136

Another example where ceq would be useful in query - https://stackoverflow.com/questions/61674263/compare-two-fields-in-graphql-hasura

avimoondra avatar May 08 '20 17:05 avimoondra

Was closed accidentally

beerose avatar Feb 03 '21 13:02 beerose

Can someone explain what the _ceq etc actually do? I can't really find it documented anywhere.

tintin10q avatar Feb 21 '23 21:02 tintin10q

@tintin10q they are column operator. They are used to compare fields instead of values.

... where: { field1: { _ceq: field2 }}

msimon avatar Feb 21 '23 23:02 msimon

@tintin10q check https://github.com/hasura/graphql-engine/releases/tag/v2.0.0

There is a section about column operator.

msimon avatar Feb 21 '23 23:02 msimon

This issue will now be reviewed and tracked as part of the Hasura V3 roadmap.

manasag avatar Dec 27 '23 10:12 manasag