浏览代码

fix: tests

Tienson Qin 6 月之前
父节点
当前提交
c9177abc9a
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/main/frontend/db/query_dsl.cljs

+ 7 - 1
src/main/frontend/db/query_dsl.cljs

@@ -732,7 +732,13 @@ Some bindings in this fn:
 
 (def db-block-attrs
   "Block attributes for db graph queries"
-  '[:db/id])
+  ;; '*' needed as we need to pull user properties and don't know their names in advance
+  (if util/node-test?
+    '[*
+      {:block/page [:db/id :block/name :block/title :block/journal-day]}
+      {:block/_parent ...}]
+    ;; db graphs needs :db/id only for query view
+    [:db/id]))
 
 (defn query
   "Runs a dsl query with query as a string. Primary use is from '/query' or '{{query }}'"