I’m trying to use datascript from vanilla JS to read my Roam Research export EDN file. However, when I try to run a basic query it fails with Error: Cannot compare :block/uid to :node/title. The exact same query works in Datascript in Clojurescript. Here’s the exact code: https://gist.github.com/saurabhsharan/7f65765713a7c96f3e60acd8987d61ba Any ideas? Thanks!
this looks like the same issue jlongster was running into in a thread above yours https://clojurians.slack.com/archives/C07V8N22C/p1641581106005500?thread_ts=1641578922.004100&cid=C07V8N22C
the gist of it is: jsedn.parse converts keywords to strings, and datascript leaves them as strings. so in your query, you'll need to surround your attributes in quotes so that datascript knows to compare them as strings
Ah, thanks so much @lilactown that fixed it perfectly! Cheers!