pathom

Joel 2025-07-23T17:52:10.468619Z

An EQL Ident value has to be a constant I believe? Can it somehow refer to an attribute, dynamic data that is? My case is actually “worse” in that I’d like to OR two attributes to determine the Ident value. I’m guessing that has to be a resolver or it involves multiple queries, but just wanted to confirm it can’t be specified in the query.

wilkerlucio 2025-07-23T17:54:01.034669Z

idents are more of a legacy feature that still supported, but nowadays is much better to always use the input entity data to provide context data to the query. for instance, instead of: [{[:user/id 1] [:user/name]}] you can go with: {:pathom/entity {:user/id 1} :pathom/eql [:user/name]}

wilkerlucio 2025-07-23T17:54:13.143229Z

(the later example is supported when you use the boundary interace)

wilkerlucio 2025-07-23T17:54:35.460109Z

you can also provide more complex entities (many attributes) or even many entities, some examples:

wilkerlucio 2025-07-23T17:55:41.916499Z

{:pathom/entity {:some-users [{:user/id 1} {:user/id 2}]
                 :complex-input {:user/first-name "Foo" :user/last-name "bar"}}
 :pathom/eql [{:some-users [:user/name]}
              {:complex-input [:user/full-name]}]}

👍🏼 1
Joel 2025-07-23T19:06:15.182409Z

But still {:user/id 1} cannot be {:user/id :my-specific/id} , as the boundary interface is :root that implies I cannot nest this in a larger query, correct?

wilkerlucio 2025-07-23T19:17:52.894159Z

not sure if I understand the question, what you mean by boundary interface is :root?

Joel 2025-07-23T19:31:03.534869Z

From the https://pathom3.wsscode.com/docs/eql#boundary-interface, it says “Support provision of root entity data”

wilkerlucio 2025-07-23T19:41:12.261829Z

yes, but you can have complex data on root entity, like on the last example I sent you here

wilkerlucio 2025-07-23T19:41:26.569029Z

you can make "containers" in the input data with segments, and query inside those

Joel 2025-07-23T19:42:45.562529Z

I guess I’m missing something “Foo” and “bar” are constants in your example…

:complex-input {:user/first-name "Foo" :user/last-name "bar"}

wilkerlucio 2025-07-23T19:43:16.614639Z

its an example sending any arbirtrary data, could be ids, or anything else

Joel 2025-07-23T19:46:51.799009Z

So then “Foo” can be :my-pathom-attribute/that-can-be-resolved and it’ll sub that value in?

wilkerlucio 2025-07-23T19:47:16.633239Z

yes

wilkerlucio 2025-07-23T19:47:44.171539Z

the entity data provides the information you know about, and you can provide anything, them the query you express what you wanna find out, considering that available input