   but usable from within a mutation.
 
   To use this function make sure your mutation specifies a return value with a remote. The remote
-  should include the abstract mutation `(app/load)` as well as any desired `(tx/fallback)`:
+  should use the helper function `remote-load` as it's value:
 
-  { :remote (om/query->ast '[(app/load)])
+  { :remote (df/remote-load env)
     :action (fn []
        (load-field-action ...)
        ; other optimistic updates/state changes)}"

    :post-mutation post-mutation))

(defn load-data-action
  "Queue up a remote load from within an already-running mutation. Similar to `load-collection`, but usable from
  within a mutation.

  To use this function make sure your mutation specifies a return value with a remote. The remote
  should include the abstract mutation `(app/load)` as well as any desired `(tx/fallback)`:

  { :remote (om/query->ast '[(app/load)])
    :action (fn []
       (load-data-action ...)
       ; other optimistic updates/state changes)}"

    :params params
    :without without
    :post-mutation post-mutation))

(defn remote-load
  "Returns the correct value for the `:remote` side of a mutation that should act as a
  trigger for remote loads. Must be used in conjunction with running `load-data-action` or
  `load-data-field` in the `:action` side of the mutation (which queues the exact things to
  load)."
  [parsing-env]
  (let [ast (:ast parsing-env)]
    (assoc ast :key 'app/load :dispatch-key 'app/load)))

;; Predicate functions
(defn data-state? [state] (impl/data-state? state))
