 (defn collect-selection-fn
   [fragments]
   (fn [col selection]
-    (log/debug "collect-selection: " selection)
+    (log/debug "collect-selection-fn: " selection)
+    (log/debug "collect-selection-fn: col: " col)
     (let [selection-type (get-selection-type selection)
           response-key (get-selection-name selection)]
+      (log/debug "selection-type: " selection-type)
       (case selection-type
         :field (conj col selection)
         ;; (throw (ex-info "TODO: add suport for selection type :fragment-spread") {})

        _ (println "fragments: " fragments)
        object-type (type-meta-fn :query)
        fields (collect-fields object-type selection-set fragments)]
    (execute-fields type-meta-fn object-type :root fields)))

(defn execute-definition
  [definition type-meta-fn]

(defn collect-fields
  "CollectFields(objectType, selectionSet, visitedFragments)"
  [object-type selection-set fragments]
  (log/debug "collect-fields: selection-set" selection-set)
  (log/spy (reduce (collect-selection-fn fragments) [] selection-set)))

(comment ; Type kind
  :SCALAR
