       (extension-type schema-hash type-def)
       (base-type schema-hash type-def))))
 
-(defmethod spec-for :variable-definition [schema-hash {:keys [variable-name type-name]}] ;; TODO what happens when it is a scalar?  where is path here?
-  (register-idempotent schema-hash [(str "var" delimiter variable-name)] (named-spec schema-hash [type-name])))
+(defmethod spec-for :variable-definition [schema-hash {:keys [v/path type-name]}]
+  (register-idempotent schema-hash (into ["var"] path) (named-spec schema-hash [type-name])))
 
 (defmethod spec-for :input-definition [schema-hash {:keys [type-name fields]}]
   (register-idempotent schema-hash [type-name] (to-keys schema-hash fields)))

(defmethod spec-for :interface-definition [schema-hash {:keys [type-name fields]}]
  (register-idempotent schema-hash [type-name] (to-keys schema-hash fields)))

(defmethod spec-for :list [schema-hash {:keys [inner-type v/path]}] ;; TODO ignores required
  (register-idempotent schema-hash path (list 'clojure.spec/coll-of (named-spec schema-hash [(:type-name inner-type)]))))

(defn- register-type-field [schema-hash path type-name]


(defmethod spec-for :default [_ _])

;; Visitors

(v/defmapvisitor keywordize :pre [n _]
  (cond
    (map? (:value n))         {:node (update n :value walk/keywordize-keys)}
