Fork me on GitHub
#om-next
<
2016-06-17
>
devth15:06:55

query re-rooting only works on joins? If I use a simple query that generates an AST like:

{:type :prop, :dispatch-key :search/results, :key :search/results, :params {:q "br"}, :query-root true}
then my remote read is not rooted at :search/results. However, if I use a more complex query that generates an AST like:
{:type :join
 :dispatch-key :search/results
 :key :search/results
 :query [{:person/name [: :]}]
 :children [{:type :join
             :dispatch-key :person/name
             :key :person/name
             :query [: :]
             :component components.person-primary-name/PersonPrimaryName
             :children [{:type :prop
                         :dispatch-key :
                         :key :
                        {:type :prop
                         :dispatch-key :
                         :key :
 :params {:q "br"}
 :query-root true}
then the remote read is correct re-rooted