;; Relations service — inter-service data queries

(defquery get-children (&key parent-type parent-id child-type relation-type)
  "Return child relations for a parent."
  (service "relations" "get-children"
    :parent-type parent-type :parent-id parent-id
    :child-type child-type :relation-type relation-type))

(defquery get-parents (&key child-type child-id parent-type relation-type)
  "Return parent relations for a child."
  (service "relations" "get-parents"
    :child-type child-type :child-id child-id
    :parent-type parent-type :relation-type relation-type))
