You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(deftesttest-full-query
(testing"OM-773: `full-query` thinks no queries exist when the query path includes a link"
(let [r (om/reconciler
{:state (atomnil)
:parser (om/parser {:read (fn [_ _ _] {})})})
idxr (get-in r [:config:indexer])
_ (p/add-root! r IdxrLinkRoot nilnil)
_ (p/index-component! idxr #?(:clj (IdxrLinkRootnilnil #js {:omcljs$reconciler r} nil)
:cljs (IdxrLinkRoot. #js {:omcljs$reconciler r})))
root (-> @idxr :class->components (get IdxrLinkRoot) first)
child #?(:clj (IdxrLinkItemnilnil #js {:omcljs$reconciler r
:omcljs$path [:a]
:omcljs$parent root} nil)
:cljs (IdxrLinkItem. #js {:omcljs$reconciler r
:omcljs$path [:a]
:omcljs$parent root}))
_ (p/index-component! idxr child)]
(is (= (om/full-query child)
'[{[:a _] [:b]}])))))
The text was updated successfully, but these errors were encountered:
Peeja
changed the title
:class-path->query can contain linksfull-query thinks "No queries exist" when the query includes a link
Sep 18, 2016
Peeja
changed the title
full-query thinks "No queries exist" when the query includes a linkfull-query thinks "No queries exist" when the query path includes a link
Sep 18, 2016
Consider a component whose query path includes a link, such as an instance of
IdxrLinkItem
from the tests:Its query will be
[{[:a _] [:b]}]
, and it will be indexed as such. However, itspath
will be[:a :b]
. This means that it will fail to match whenfull-query
looks up the query in the indexer.The text was updated successfully, but these errors were encountered: