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
Groq query stops to support parameters in slicing expression #55
Comments
You'll have to pass the same parameters to const params = { start: 0, end: 1 }
evaluate(parse('*[$start..$end]', { params }), { dataset: [], params })
|
Thank you. It works. Would be good to highlight this in docs through. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Starting from 0.3.0 version groq-js doesn't support
To Reproduce
Make query:
evaluate(parse('*[$start..$end]'), { dataset: [], params: { start: 0, end: 1 } })
Expected behavior
The result should be the same as for:
evaluate(parse('*[0..1]'), { dataset: [] })
Actual behavior
GroqQueryError: slicing must use constant numbers
GroqJS version:
0.3.0 oor highere
Problem is not reproducible with groq-js version 0.2.0.
The text was updated successfully, but these errors were encountered: