Fork me on GitHub
#pathom
<
2020-01-30
>
λustin f(n)17:01:04

Can you provide multiple 'idents' to the root of a query? If so, how? For example, if you want to test a resolver that requires two inputs. For example, this is what I have tried so far... [{[:input1 "foo" :input2 42] [:product]}]

λustin f(n)17:01:49

The only other place where I currently am using resolvers that take two items, one of the items is a global. I have had no issues with using that one.

kszabo18:01:55

I submitted an improvement idea about this, see the thread for some points on this use-case: https://github.com/wilkerlucio/pathom/issues/140

kszabo18:01:48

@austin021 you either have to create a composite key attribute like [{[:input1+input2 ["foo" 42]] [:product]}] or do [{([:input1 "foo"] {:pathom/context {:input2 42}}) [:product]}]. My idea was to enable [{{:input1 "foo :input2 42} [:product]}] which I still believe is nicer syntax so I’ll probably release a tiny lib to enable it if you want to enable it in your parser.

👍 8
kszabo01:02:36

Bit more cleaning up to do, sadly this required a fork of eql+pathom