graphql-compose / graphql-compose/graphql-compose-elasticsearch

sort option not working in search

Open
#67 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
584
Forks
76
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.