    :to-vertex to-vertex
    :from from
    :to to
+   :root root
    :where where
    :match match
    :values values

  [fields]
  [{:$sort fields}])

(defn group-count
  [path]
  [{:$group {:_id (str "$" path) :count {:$sum 1}}}

        (reduce
         (fn [queries s]
           (let [label (first s)
                 query (concat
                        [{:mark label}]
                        (rest s)
                        [{:select [label]}
                         {:root label}])]
             (assoc queries label (translate query))))
         {} sub)]
    [{:$facet queries}]))

     ;; {:$setIntersection (mapv (comp (partial str "$") first) queries)}

(def steps
  {:from-edge from-edge
