Skip to content

Query don't work. #42

@Svenum

Description

@Svenum

What Happened?

I have a query, that works perfectly in my graph but not on my published site.

#+BEGIN_QUERY
{:title [:h1 "Neusten Einträge"]
 :query [:find ?d (pull ?p [*])
  :keys d block
  :where
   [?b :block/page ?p]
   [?p :block/properties ?prop]
   [(get ?prop :createdon) ?date]
   [(get ?prop :type) ?type]
   [?j :block/journal-day ?d]
   [?j :block/original-name ?name]

   [(contains? ?date ?name ?type)]
 ]
 :result-transform (fn [res] 
   (take 10 
  (sort-by (fn [s] (get-in s [:block/properties :d])) > (map (fn [m] 
     (update (:block m) :block/properties 
         (fn [u] (assoc u :d (get-in m [:d]))
         ))
  ) res)))
 )
}
#+END_QUERY

Reproduce the Bug

  1. Add the Query to your graph
  2. You need some pages with the property "createdon:: [[yyyy-mm-dd]]"
  3. Publish the site using the github action

Expected Behavior

The query should show results on the website as on the graph

Desktop or Mobile Platform Information

OS: NixOS
version: Flaptak Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions