graphql-compose-elasticsearch icon indicating copy to clipboard operation
graphql-compose-elasticsearch copied to clipboard

sort option not working in search

Open thejibz opened this issue 5 years ago • 1 comments

When using the search query helper if you set the sort option using the enum generated you get an error like: Query:

{
elastic(q: "hazelcast", limit: 3, sort:Id__raw__asc) {
    hits { ... }
}

Response: "message": "Variable \"$_v1_sort\" got invalid value [{ Id.raw: \"asc\" }]; Expected type elasticSortEnum at value[0]."

It seems that the lib convert the enum to string too early in the process and the graphql parser which expect an Enum get a String instead.

thejibz avatar Jun 11 '19 14:06 thejibz

Please advise for the workaround of sort enum?

voratham avatar Aug 19 '20 06:08 voratham