This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-16
Channels
- # aleph (2)
- # announcements (1)
- # aws (2)
- # babashka (5)
- # beginners (122)
- # boot-dev (1)
- # cider (3)
- # clara (7)
- # cljdoc (11)
- # clojure (161)
- # clojure-dev (45)
- # clojure-europe (8)
- # clojure-france (1)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-nl (11)
- # clojure-uk (34)
- # clojurebridge (2)
- # clojurescript (13)
- # cryogen (10)
- # cursive (13)
- # datomic (25)
- # emacs (8)
- # fulcro (76)
- # graalvm (2)
- # jackdaw (5)
- # jobs-discuss (2)
- # juxt (13)
- # off-topic (13)
- # pathom (5)
- # pedestal (7)
- # quil (2)
- # reitit (9)
- # remote-jobs (4)
- # schema (1)
- # shadow-cljs (33)
- # spacemacs (8)
- # sql (9)
- # vim (2)
- # vrac (2)
Anyone seen this error message before? How best to get some better context for where it came from (without altering the source):
Execution error (IllegalArgumentException) at com.wsscode.pathom.connect/split-good-bad-keys$fn (connect.cljc:643). => Don't know how to create ISeq from: clojure.lang.Keyword
It turned out that I wasn't returning the correct format from a resolver. I was (for reasons unknown!) returning a vector of vectors rather than a vector of maps at a particular join.
@U0D5RN0S1 @U066U8JQJ it looks like the latest Pathom release (one of, at least) became more strict on what is allowed to be returned. I did return true
in a few mutations and it stopped working. Not a big deal ofc, jfy
I’m looking into moving an existing javascript UI to query a pathom/eql/transit api instead of graphql. Has anyone done this with transit-js? … Well, that was easy enough … I got the basic idea to work for reading the result, something like:
var t = require("transit-js")
var r = t.reader("json" , {
// , {
// "handlers": {
// "key": function(rep) { return rep.toString() }
// }
mapBuilder: {
init: function(node) { return {} },
add: function(ret, key, val, node) {
let k = key;
let v = val;
if( t.isKeyword(key) )
k = key.toString();
if( t.isKeyword(val) )
v = val.toString();
ret[k] = v;
return ret },
finalize: function(ret, node) { return ret }
}
}
);
var res = r.read('["^ ","~:org.riverdb.db.agencylookup",[["^ ","~:db/id","17592186158592","~:agencylookup/AgencyCode","AMS"]]]');
=>
{":org.riverdb.db.agencylookup": [{":agencylookup/AgencyCode": "AMS", ":db/id": "17592186158592"}]}
I'm still trying to understand when transitive dependencies are picked up. For example I'm supplying :organisation/id
as an input to a resolver. With that attribute alone a lot of other attributes are determined. For example given an organisation you get a time-info which has a current-period. So should I be able to rely on Pathom to work out :time-info/current-period
by itself? If so the query could supply the :organisation/id
input, but :time-info/current-period
would just be stated as a 'co-input' to the resolver, and Pathom would find the current period of the organisation and put it in. What I'm seeing is that as soon as I put :time-info/current-period
in as an input the resolver is not called.