 ;;; Queryable Entities
 (def inventory-query
   "Query for inventory"
-  (map->Query {:projections {"certname" {:type :string
+  (map->Query {::which-query :inventory
+               :projections {"certname" {:type :string
                                          :queryable? true
                                          :field :certnames.certname}
                              "timestamp" {:type :timestamp


(def packages-query
  "Basic packages query"
  (map->Query {:projections {"package_name" {:type :string
                                             :queryable? true
                                             :field :p.name}
                             "version" {:type :string


(def facts-query
  "Query structured facts."
  (map->Query {::which-query :facts
               :projections {"certname" {:type :string
                                         :queryable? true
                                         :field :fs.certname}
                             "environment" {:type :string
