So they’re not too different.
Query-page refers to the page the query is written on. The current-page refers to the page you are viewing in the main window of logseq. For example if the query is on a page open in the right side bar, current-page refers to the page you are viewing and query-page to the page open in the sidebar. If you’re viewing the query-page in the main window, they are the same.
This is how you get todo that are either on the current journal page or referencing it. Assuming the query is on the same page.
#+BEGIN_QUERY
{:title [:b "TODO for this journal page"]
:inputs [:query-page]
:query [:find (pull ?b [*])
:in $ ?page
:where
[?p :block/name ?page]
[?b :block/marker ?m]
[(contains? #{"TODO"} ?m)]
(or
[?b :block/page ?p]
[?b :block/refs ?p]
)
]
}
#+END_QUERY