 
 (defn execute-query [query]
   (let [selection-set (:selection-set query)
-        visitied-fragments nil]
-    (evaluate-selection-set :root nil selection-set visitied-fragments)))
+        visitied-fragments nil
+        object-type (get-type-meta :query)]
+    (evaluate-selection-set object-type :root selection-set visitied-fragments)))
 
 (defn execute-definition
   [definition]

  :NOT_NULL)

(def type-map
  {:UserType {:name "User"
              :kind :OBJECT
              :fields {:id {:type :GraphQLString}
                       :name {:type :GraphQLString}}
              :args {}
              :resolve-fn (fn [object] {:id "test"})}})

(def schema
  {:query {:name "Query"
           :kind :OBJECT
           :fields {:user {:type :UserType}}
           :args {:id :GraphQLString}}})

(defn type-system-lookup
  [object-type object-name]
  (case object-type
    :root (case object-name
            "user" {:name "User"
                    :kind :OBJECT
                    :fields {:id {:type :GraphQLString}
                             :name {:type :GraphQLString}}
                    :args {}
                    :resolve-fn (fn [object] {:id "test"})}
            (throw (ex-info (format "Unknown object name: %s." object-name) {})))
    (throw (ex-info (format "Unknown object type: %s." object-type) {}))))

(defn get-field-type-from-object-type
  "FIXME"

  (println (format "get-field-type-from-object-type: object-type: %s, field-selection: %s." object-type field-selection))
  (let [object-name (get-selection-object-name field-selection)
        _ (println "object-name: " object-name)
        type (get-in object-type [:fields (keyword object-name) :type])]
    (if (map? type)
      type
      (get-type-meta type))))

(defn resolve-field-on-object
  "FIXME"
  [object-type object field-entry]
  (let [object-name (get-selection-object-name field-entry)
        resolve-fn (:resolve-fn object-type)]
    (println "resolve-filed-on-object: object-type: " object-type)
    (println "resolve-field-on-object: resolve-fn: " resolve-fn)
    (resolve-fn object)))

(defn merge-selection-sets
