Fork me on GitHub
#om-next
<
2016-06-08
>
pleasetrythisathome22:06:40

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

pleasetrythisathome22:06:49

looks like gather-sends calls the parser for each remote

pleasetrythisathome22:06:06

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

pleasetrythisathome22:06:42

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

pleasetrythisathome22:06:57

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

pleasetrythisathome22:06:18

for example. i have two a query like

pleasetrythisathome22:06:38

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

pleasetrythisathome22:06:26

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

pleasetrythisathome22:06:09

i'd expect :send to be called with

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

pleasetrythisathome22:06:45

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 []}

pleasetrythisathome22:06:16

which actually makes sense looking at gather sends

pleasetrythisathome22:06:56

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

pleasetrythisathome23:06:54

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

pleasetrythisathome23:06:01

that could definitely use some documentation

pleasetrythisathome23:06:17

glad i understand that code now though

pleasetrythisathome23:06:24

thanks for rubber ducking channel