What component does this affect?
SurrealDB Server
Describe the bug
When running a live query from the javascript SDK, it can cause updates pushed from a separate client to fail.
Steps to reproduce
const accountId = new RecordId("account", "u8idykv574ut278gjj4f")
const testResponse = await db.db.query("SELECT * FROM account WHERE id = type::record($accountId);", {
accountId: accountId.toString()
})
console.log("001", testResponse) // WORKS FINE
console.log("002 id", accountId, accountId.toString())
const response = await db.db.query<[Uuid]>(
// From Surrealist I'm running:
// UPDATE type::record('account:u8idykv574ut278gjj4f') MERGE {
// updated_at: time::now()
// };
// This crashes the update I'm pushing from surrealist, with the error:
// 'Expected a record but cannot convert NONE into a record'
// I don't feel a client query should be able to affect an update from a separate client???
// and it doesn't fire my subscription.
"LIVE SELECT * FROM account WHERE id = type::record($accountId);",
{
accountId: accountId.toString()
}
);
// This works compleatly fine. Fires my subscription as expected.
// const response = await db.db.query<[Uuid]>(
// "LIVE SELECT * FROM account WHERE id = type::record('account:u8idykv574ut278gjj4f')"
// );
const liveQueryUuid = response[0];
live = await db.db.liveOf(liveQueryUuid);
live.subscribe(() => {
console.log("PLEASE HAPPEN")
})
Expected behaviour
Expected behaviour is surrealist update completes as expected, and I don't receive 'Expected a record but cannot convert NONE into a record'.
SurrealDB version
2.6.3 on Ubuntu, javascript sdk: 2.0.3
Contact Details
Could this be a bug with your application?
Is there an existing issue for this?
Code of Conduct
What component does this affect?
SurrealDB Server
Describe the bug
When running a live query from the javascript SDK, it can cause updates pushed from a separate client to fail.
Steps to reproduce
Expected behaviour
Expected behaviour is surrealist update completes as expected, and I don't receive 'Expected a record but cannot convert NONE into a record'.
SurrealDB version
2.6.3 on Ubuntu, javascript sdk: 2.0.3
Contact Details
Could this be a bug with your application?
Is there an existing issue for this?
Code of Conduct