List of recently created/modified pages (timestamp issues)

Why does this query work in a normal block but not when I put it into my :default-queries in config.edn?

Normal block behaviour:
grafik

Journal page:
grafik

From my config.edn:

 :default-queries
 {:journals
  [{:title "🔨 DOING"
    :query [:find (pull ?h [*])
            ;;:in $ ?start ?today
            :where
            [?h :block/marker ?marker]
            [(contains? #{"NOW" "DOING"} ?marker)] 
            [?h :block/page ?p]]
            ;;[?p :block/journal? true]
            ;;[?p :block/journal-day ?d]
            ;;[(>= ?d ?start)]
            ;;[(<= ?d ?today)]]
    ;;:inputs [:14d :today]
    :breadcrumb-show? false
    :result-transform (fn [result]
                        (sort-by (fn [h]
                                   (get h :block/priority "Z")) result))
    :collapsed? false}
   {:title "📅 NEXT"
    :query [:find (pull ?h [*])
            :in $ ?start ?next
            :where
            [?h :block/marker ?marker]
            [(contains? #{"NOW" "LATER" "TODO"} ?marker)]
            [?h :block/ref-pages ?p]
            [?p :block/journal? true]
            [?p :block/journal-day ?d]
            [(> ?d ?start)]
            [(< ?d ?next)]]
    :inputs [:today :7d-after]
    :collapsed? false}
	{:title [:h2 "My 24h changes"]
	:query [:find (pull ?b [* {:block/_parent ...}])
			:in $ ?end
			:where
			[?b :block/updated-at ?v]
			[(- ?end 86400000 ) ?period]
			[(>= ?v ?period)]
			[(< ?v ?end)]
			]
	:inputs [:end-of-today-ms]
	:collapsed? false
	}
   ]}
1 Like