edgedb-js
edgedb-js copied to clipboard
"function $x does not exist" when using optional function parameters
Code The code causing the error.
e.select(e.greet('greg')).run(db);
# OR
e.select(e.greet('greg'), e.cast(e.str, e.set())).run(db);
Schema
module default {
function greet(name: str, suffix: optional str) -> str using (
"Hello, " ++ name
);
}
Generated EdgeQL
SELECT default::greet("greg")
Error or desired behavior
QueryError: function "default::greet(arg0: std::str)" does not exist
Versions (please complete the following information):
- OS:
- EdgeDB version (e.g.
2.0): 4.5+28216a1" - EdgeDB CLI version (e.g.
2.0): 4.1.0+03ae624 -
edgedb-jsversion (e.g.0.20.10;): 1.4.1 -
@edgedb/generateversion (e.g.0.0.7;): 0.4.1 - TypeScript version: 5.3.3
- Node/Deno version: 20.9.0