   (:user/email (d/pull (d/db conn) [:user/email] [:user/id user-id])))
 
 (defn create-invitation!
-  [{:keys [id inviter-id invitee-email group-id]}]
-  (-> {:invite/id id
+  [conn {:keys [id inviter-id invitee-email group-id]}]
+  (->> {:invite/id id
        :invite/group [:group/id group-id]
        :invite/from [:user/id inviter-id]
        :invite/to invitee-email
        :invite/created-at (java.util.Date.)}
-      create-entity!
+      (create-entity! conn)
       db->invitation))
 
 (defn get-invite

    conn
    [[:db/retract [:user/id user-id] :user/open-thread [:thread/id thread-id]]]))

(defn create-tag! [attrs]
  (-> {:tag/id (attrs :id)
       :tag/name (attrs :name)
       :tag/group [:group/id (attrs :group-id)]}
      create-entity!
      db->tag))

(defn tag-group-id [conn tag-id]

                       :tag/description description]]))

(defn create-extension!
  [conn {:keys [id type group-id user-id config]}]
  (->> {:extension/group [:group/id group-id]
       :extension/user [:user/id user-id]
       :extension/type type
       :extension/id id
       :extension/config (pr-str config)}
      (create-entity! conn)
      db->extension))

(defn retract-extension!
