You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting in 25.x release I am experiencing an issue with Vertex records coming back with @cat = "d" and not properly converting into a Result object.
I was able to create a small example and able to reproduce the issue. I start from a clean DB.
I have a Vertex type in the DB called Tenant. The schema in the JSON format is below.
When I insert a new record I use the following command:
INSERT INTO Tenant CONTENT {"tenantStatus":"Active","empowerTenantId":"01958b6a-7484-7970-a461-62a5c4502e26","tenantName":"ShakeIQ, Inc.","@type":"Tenant","empowerType":"empower.tenant.Tenant","@cat":"v","_auditMetadata":{"createdDate":1741800764557,"createdByUser":"service-account-empower-platform-admin","lastModifiedDate":1741800764557,"lastModifiedByUser":"service-account-empower-platform-admin"},"id":"01958b6a-7484-7970-a461-62a5c4502e26","tenantCode":"shakeiq","primaryTenant":false,"tenantDomain":"platform.local.shakeiq.ai"}
The record is properly added and I can see it in the studio and it has @type = "Tenant" and @cat = "v".
When I run an HTTP API command in the same way it is executed by the RemoteDatabase class:
curl -X POST http://localhost:2480/api/v1/query/local_shakeiq_empower_platform -d '{"language":"SQL","command":"SELECT * FROM Tenant","serializer":"record"}' -H "Content-Type: application/json" --user root:xxxxxxxxxx
I get a JSON with @cat = "d" as follows:
Starting in 25.x release I am experiencing an issue with Vertex records coming back with @cat = "d" and not properly converting into a Result object.
I was able to create a small example and able to reproduce the issue. I start from a clean DB.
I have a Vertex type in the DB called Tenant. The schema in the JSON format is below.
When I insert a new record I use the following command:
INSERT INTO Tenant CONTENT {"tenantStatus":"Active","empowerTenantId":"01958b6a-7484-7970-a461-62a5c4502e26","tenantName":"ShakeIQ, Inc.","@type":"Tenant","empowerType":"empower.tenant.Tenant","@cat":"v","_auditMetadata":{"createdDate":1741800764557,"createdByUser":"service-account-empower-platform-admin","lastModifiedDate":1741800764557,"lastModifiedByUser":"service-account-empower-platform-admin"},"id":"01958b6a-7484-7970-a461-62a5c4502e26","tenantCode":"shakeiq","primaryTenant":false,"tenantDomain":"platform.local.shakeiq.ai"}
The record is properly added and I can see it in the studio and it has @type = "Tenant" and @cat = "v".
When I run an HTTP API command in the same way it is executed by the RemoteDatabase class:
curl -X POST http://localhost:2480/api/v1/query/local_shakeiq_empower_platform -d '{"language":"SQL","command":"SELECT * FROM Tenant","serializer":"record"}' -H "Content-Type: application/json" --user root:xxxxxxxxxx
I get a JSON with @cat = "d" as follows:
If I use no serializer the result is the same.
If I use serializer = "graph" I get the correct JSON for my record with "@cat": "v" as follows:
At this point if I use the RemoteDatabase API the Result isn't properly classified as a Vertex and my app fails.
Interestingly though, if the INSERT command is immediately followed by an UPDATE with MERGE command the HTTP API return correctly.
After I execute the following in the studio:
UPDATE #7:0 MERGE {"tenantStatus":"Active","empowerTenantId":"01958b6a-7484-7970-a461-62a5c4502e26","tenantName":"ShakeIQ, Inc.","@type":"Tenant","empowerType":"empower.tenant.Tenant","@cat":"v","_auditMetadata":{"createdDate":1741800764557,"createdByUser":"service-account-empower-platform-admin","lastModifiedDate":1741800764580,"lastModifiedByUser":"service-account-empower-platform-admin"},"id":"01958b6a-7484-7970-a461-62a5c4502e26","tenantCode":"shakeiq","primaryTenant":true,"tenantDomain":"platform.local.shakeiq.ai"} RETURN AFTER @rid
which updates a single field (primaryTenant is set to true) the following is the result of the API call with correct "@cat": "v":
I didn't test other types of INSERT and UPDATE as I only use JSON.
Schema for type Tenant:
The text was updated successfully, but these errors were encountered: