Graph paging logic uses double-quotes which breaks if id contains $ sign
- Dominant language
- TypeScript
- Stars
- 131
- Forks
- 67
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 10
Description
How to repro:
* Have more than 100 vertices in the graph
* At least one vertex has an `id` that contains `$`. For example: `foo$bar`.
* Execute `g.V()` and see the `ScriptError` coming out of the backend.
The problem:
Double-quoted strings denote Groovy string interpolation where ‘$’ denotes the beginning of a placeholder.
Eg.
"${cosmosAccount}" -- this is expected to be replaced with the value of variable cosmosAccount.
To avoid this and treat the entire string as a literal, single-quoted strings should be used.
Eg.
'$Default'
So the fix would be to ensure that the gremlin result pager uses single quoted strings for partition key/id values in the query builder.
Contributor guide
Assessment
This issue has not been assessed yet.