Closed MrFoxPro closed 5 months ago
probably wrapping into select <json>(..)
fixes this
This issue is hard to read because you've edited the original question. The problem is with this EdgeQL query:
select <json>OtpPhoneRequest { id, phone } filter .id = {}
> Error: InvalidReferenceError: invalid property reference on a primitive type expression (on line 1, column 57)
It is saying that field id
does not exist on type json
. This happens because you first cast to json and then filter.
This is what you wanted to do:
select <json>(select OtpPhoneRequest { id, phone } filter .id = {})
Although the bindings could print an nicer error message that would look like this:
Error:
select <json>OtpPhoneRequest { id, phone } filter .id = {}
^^^
invalid reference
Details: invalid property reference on a primitive type expression
Ref #282
According to this: https://github.com/edgedb/edgedb-rust/blob/master/edgedb-derive/src/lib.rs#L59-L74 I wrote code:
An error happened:
Error
Tried on v4.2, v4.7, v5-beta3