Fork me on GitHub
#xtdb
<
2023-04-05
>
Mikko Harju17:04:56

Hiya! Just got back to our little XTDB project, tried using xt/new-api-client but if I do a query with pull containing a * – i get an error “No reader function for tag object” – I’m running on 1.21.0 so this might be something that is fixed or am I doing something wrong? If I don’t use * the query works

Mikko Harju17:04:29

If this is a bug and it is fixed later on, what is the migration strategy at this point? 🙂

refset19:04:38

Hey! That sounds weird. I guess it sounds like you wrote something into XT with an edn tag that you're subsequently no longer using / have removed from the environment, and XT can't decode it without a valid reader

refset19:04:51

Is there a full stacktrace for that?

refset19:04:23

no hint of what the offending key was?

Mikko Harju04:04:46

Basically

(defn get-facts [user-id]
  (xt/q (xt/db node)
        '{:find [(pull u [* {(:user/_id {:as :user/knows}) [:user/rating {:core/skill [:core/name]}]}])]
          :where [[u :xt/id user-id]
                  [u :user/name name]]
          :in [user-id]}
        user-id))
called with
(get-facts #uuid "xxxx")
caused it. If I remove * and put the fields there instead, it works. It seems to work with repl with * just fine.

refset09:04:42

Hmm, and what happens if you call entity? Does the document look like it only contains regular edn forms? No custom reader tags?