om-next

pleasetrythisathome 2016-06-08T22:32:40.000012Z

hey everyone. I'm suddenly finding myself confused about om.next sends and wondering if something has changed (so much has) in the alpha versions since the fall

pleasetrythisathome 2016-06-08T22:33:49.000015Z

looks like gather-sends calls the parser for each remote

pleasetrythisathome 2016-06-08T22:34:06.000016Z

what i'm seeing, is that the :send function is being called with the result from parser methods

pleasetrythisathome 2016-06-08T22:34:42.000017Z

shouldn't the actual query be sent, with queries that return values being filtered out?

pleasetrythisathome 2016-06-08T22:36:57.000018Z

i guess i'm confused as to the intention behind which parts of the query are being sent, and what exactly causes the send

pleasetrythisathome 2016-06-08T22:37:18.000019Z

for example. i have two a query like

pleasetrythisathome 2016-06-08T22:37:38.000020Z

[{:client/config (om/get-query Search)}
     :user/authenticated
     :contact-groups/list
     (list :contact-group.contacts/list {:front/name "Tutor"})]

pleasetrythisathome 2016-06-08T22:38:26.000021Z

:user/authenticated returns a map in the cljs parser, the following two queries return empty lists and should be sent to the remote

pleasetrythisathome 2016-06-08T22:39:09.000022Z

i'd expect :send to be called with

[:contact-groups/list
 (:contact-group.contacts/list {:front/name "Tutor"})]

pleasetrythisathome 2016-06-08T22:39:45.000023Z

but instead, i see

{:user/authenticated
 {:db/id 17592186045434,
  :user/name "Dylan Butman",
  :user/scopes
  [{:db/id 17592186045425, :db/ident :user.scopes/user}
   {:db/id 17592186045427, :db/ident :user.scopes/superuser}],
  :user/uid "pleasetrythisathome"},
 :contact-groups/list [], 
 :contact-group.contacts/list []}

pleasetrythisathome 2016-06-08T22:40:16.000024Z

which actually makes sense looking at gather sends

pleasetrythisathome 2016-06-08T22:40:56.000025Z

but definitely isn't what the backend parser is looking for

pleasetrythisathome 2016-06-08T23:11:54.000027Z

alright figured it out. i was wrapping the parse method and wasn't passing target along when it was present

pleasetrythisathome 2016-06-08T23:12:01.000028Z

that could definitely use some documentation

pleasetrythisathome 2016-06-08T23:12:17.000029Z

glad i understand that code now though

pleasetrythisathome 2016-06-08T23:12:24.000030Z

thanks for rubber ducking channel