 (defn- to-type-names [_ & args] {:type-names (mapv :type-name args)})
 (defn- to-list [_ arg] {:node-type :list :inner-type arg :kind :LIST})
 (defn- add-required [_ arg] (assoc arg :required true))
-(defn- to-document [_ & args] (group-by :section args))     ;; TODO deal with nil instead of empty vector, deal with fragments vs. fragment definitions
+(defn- to-document [_ & args] (group-by :section args))
 
 (defn- to-type-system-type [k & args]
   (-> (into {:node-type k} args)

                        :enum-fields       :fields
                        :input-type-fields :fields
                        :directive-on-name :on})
      (assoc :kind (get type-system-type->kind (:node-type definition)))))

(def ^:private transformations
  "Map from transformation functions to tree tags.

   unwrap-name               #{:TypeName :ArgumentName :FieldName :VariableName :EnumValue}
   to-type                   #{:Query :Mutation}
   to-enum-type              #{:EnumTypeInt}
   to-vec                    #{:SelectionSet :TypeFields :InputTypeFields :TypeFieldArguments :VariableDefinitions :Arguments :Directives :EnumFields}
   parse-int                 #{:IntValue}
   parse-double              #{:FloatValue}
   parse-string              #{:StringValue}
