Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort option not working in search #67

Open
thejibz opened this issue Jun 11, 2019 · 1 comment
Open

sort option not working in search #67

thejibz opened this issue Jun 11, 2019 · 1 comment

Comments

@thejibz
Copy link
Contributor

thejibz commented Jun 11, 2019

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.

@voratham
Copy link

Please advise for the workaround of sort enum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants