surrealdb / surrealdb.js

SurrealDB SDK for JavaScript
https://surrealdb.com
Apache License 2.0
272 stars 45 forks source link

Bug: live query does not return a json patch #202

Open blobinabottle opened 7 months ago

blobinabottle commented 7 months ago

Describe the bug

I'm trying the live query with diff params set to true. It works but the patch I'm receiving is not a JSON patch as stated in the doc (which would be useful). I get patch like this {op: "change", path: "/value", value: "@@ -1,3 +1,3 @@↵-301↵+439↵"}]

I could write a custom patch / diff method but JSON patch is probably better (sorry If I'm missing the point)

Steps to reproduce

Very simple. Just using js sdk with something like await db.live( , cb, true);

Expected behaviour

Receive a correct patch (op: "replace" vs "change")

SurrealDB version

1.0

SurrealDB.js version

0.11

Contact Details

chemise-aneroide0h@icloud.com

Is there an existing issue for this?

Code of Conduct