-
Notifications
You must be signed in to change notification settings - Fork 20
om.next dedpue parser
Petter Eriksson edited this page Nov 22, 2017
·
3 revisions
Multiple UI components can depend on the same query roots and we don't want to execute queries for the same roots more than once, so we dedupe the query roots and merge the pull patterns.
Check out the dedupe-parser
function in eponai.common.parser
. It takes an om.next/parser and a read-function. It will return the same response as a normal om.next/parser, just not executing the same root queries more than once.
This dedupe parser also solves a problem in om.next (https://github.com/omcljs/om/issues/869) having to do with om.next/transform-reads
that’s called in a few places.