Fork me on GitHub
#om
<
2016-10-17
>
lockdown07:10:35

how does om.next deal with minimizing the load of network requests (ex: less requests, less data - fetch only what you need) if it doesn't have a server side story like facebook's relay/graphql, where graphql is the server and relay the client?

anmonteiro07:10:52

@lockdown: glad you're interested in Om Next! It does provide a server-side story. The Om Next parser (think a function of query->data) runs both on client and server

anmonteiro07:10:30

That's how we can minimize payloads according to specific clients

anmonteiro07:10:45

Minimizing requests works through having queries in UI components: because queries have to compose in the Component tree just like components do, we can grab the whole query for an app and send it to the server in 1 batched request

anmonteiro07:10:29

Hope the above helps, happy to clarify any other questions!

lockdown07:10:04

thanks, don't really know much about om, was just skimming through it, definitely want to start playing with it.

lockdown07:10:53

so queries are not coupled to the server right? you can add new fields to your api(the server) and existing client queries should just still work?

anmonteiro08:10:25

and the opposite is also true, you can add extra keys to your client and you don’t need to change the backend

anmonteiro08:10:36

(with the gotcha that it knows how to serve them in the first place)

levitanong11:10:04

Any advice to figure out what queries are taking long? I’m getting messages like [676.720s] [om.next] [object Object] query took 37 msecs And I’m not sure what to do with them

alex-glv18:10:53

Hmm… If I don’t use any side-effect producing functions like set-query! etc, and return modified AST from a reader, will this reader be hit with the returned AST on next local read, or it’s always produced from components static query?

alex-glv18:10:10

Thanks. I am observing the situation where I get different query in AST on one of the reads, I am not sure how I get that. Incidentally this AST is what I return in prev queries, but maybe it’s one of my read keys I pass after mutation

alex-glv18:10:23

If I (mutate!), then should I pass the full query to be updated after the mutation? What I am doing is basically (om/get-query component) after I mutate smt, say change the route

solussd19:10:24

@anmonteiro regarding the question last week, you can transact! + force w/o a mutation. It works, swell!

anmonteiro19:10:46

hah, awesome! I’ll be using + recommending that trick 🙂

ag23:10:16

Hey guys, I need an example where parser being used in a read defmethod. I know it's possible to send part of a query back to parser, I don't remember how though.