cannot graphql data you can't see

This commit is contained in:
BC
2018-07-10 21:55:13 -07:00
parent dd9b7ce86e
commit e0ba9395ef
6 changed files with 24 additions and 10 deletions

View File

@@ -22,7 +22,8 @@
(companies/get-by-id (:company_id value)))))
(defn get-transaction-page [context args value]
(let [extra-context
(let [args (assoc args :id (:id context))
extra-context
(cond-> {}
(executor/selects-field? context :invoice/vendor) (assoc :vendor-cache (by :id (vendors/get-all)))
(executor/selects-field? context :invoice/company) (assoc :company-cache (by :id (companies/get-all))))