Describe the bug
Currently if your derived fields are not in the same order as your query's, you will run into "unexpected field foo expected bar" errors, which is not intuitive as most things in Rust do not require struct order.
Reproduction
Include the code that is causing the error:
#[derive(Queryable)]
struct Foo {
foo: String,
bar: u64,
}
let foo = edgedb
.query_single::<Foo, _>(
"select Foo { bar, foo }",
&(),
)
.await
.unwrap();
called `Result::unwrap()` on an `Err` value: Error(Inner { code: 4278386176, messages: [], error: Some(WrongField { unexpected: "bar", expected: "foo" }), headers: {}, fields: {("capabilities", TypeId { t: 192899057483148890509852589200417735385 }): Any { .. }} })
Expected behavior
I expect that the order the fields in the derive has no effect on the query's ability to decode, the above code should just work.
Versions (please complete the following information):
Describe the bug Currently if your derived fields are not in the same order as your query's, you will run into "unexpected field foo expected bar" errors, which is not intuitive as most things in Rust do not require struct order.
Reproduction Include the code that is causing the error:
Expected behavior I expect that the order the fields in the derive has no effect on the query's ability to decode, the above code should just work.
Versions (please complete the following information):
a109491