Open anubra266 opened 10 months ago
There is something peculiar with properties named isActive
via QB. We get an error thrown at toEdgeQL
on a simple select of an object including isActive: true
.
[cause]: Error: Field "isActive" does not exist in default::User
at shapeToEdgeQL (webpack-internal:///(api)/./dbschema/edgeql-js/toEdgeQL.mjs:709:23)
at renderEdgeQL (webpack-internal:///(api)/./dbschema/edgeql-js/toEdgeQL.mjs:498:28)
at Proxy.$toEdgeQL (webpack-internal:///(api)/./dbschema/edgeql-js/toEdgeQL.mjs:125:18)
at Proxy.$queryFunc (webpack-internal:///(api)/./dbschema/edgeql-js/query.mjs:31:24)
Bizarrely, isActive
does not show up on ["*"]
for the object either.
Everything works as expected in EdgeQL. Move this to the JS repo @raddevon?
Now seeing similar behavior with a computed boolean with a different name on a different object. So it is not the name isActive
but perhaps something about booleans? But we've used booleans in countless places w/o issue. Really at a loss here.
I get this![image](https://github.com/edgedb/edgedb/assets/30869823/6f2b0d95-d534-4e33-940e-1a55d8603e2d)
This is my query. isActive is a computed property on Membership type. I'm doing memberships because it's a multi link on User to the Membership type Membership is an abstract type, and OrgMembership is a polymorphic type that extends it
This is the generated edheQl
User type![image](https://github.com/edgedb/edgedb/assets/30869823/0558d9e0-2b88-4591-96af-044ecfde62d2)
Abstract membership type![image](https://github.com/edgedb/edgedb/assets/30869823/697cefa2-ff13-42b2-98f8-d838ee0b3337)
OrgMembership type![image](https://github.com/edgedb/edgedb/assets/30869823/389be4ec-106a-446d-89ec-4f7a5721c36e)