Open Peeja opened 7 years ago
Using ..., the parser recurses the query as the query in the env. Using an integer for bounded recursion, it doesn't.
...
query
env
(let [p (om/parser {:read (fn [{:keys [query]} _ _] {:value {:query query}})})] (prn (p {} [{:abc [:def]}] nil)) (prn (p {} [{:abc '...}] nil)) (prn (p {} [{:abc 5}] nil))) ;; Prints: ;; {:abc {:query [:def]}} ;; {:abc {:query [{:abc ...}]}} ;; {:abc {:query 5}} ;; Expected ;; {:abc {:query [:def]}} ;; {:abc {:query [{:abc ...}]}} ;; {:abc {:query [{:abc 4}]}}
Using
...
, the parser recurses the query as thequery
in theenv
. Using an integer for bounded recursion, it doesn't.