I wanted to filter out daily nodes and refs nodes so I wrote the following in my configuration. Hope it will help someone else out there.
(Btw I use Doom.)
(cl-defun my/org-roam-node--filter-by-tags (node &optional included-tags excluded-tags)
"Filter org-roam-node by tags."
(let* ((tags (org-roam-node-tags node))
(file-path (org-roam-node-file node))
(rel-file-path (f-relative file-path org-roam-directory))
(parent-directories (butlast (f-split rel-file-path)))
(tags (cl-union tags parent-directories)))
(if (or
;; (and included-tags (cl-notevery (lambda (x) (cl-member x tags :test #'string=)) included-tags))
(and included-tags (not (cl-intersection included-tags tags :test #'string=)))
(and excluded-tags (cl-intersection excluded-tags tags :test #'string=))
) nil t)))
(cl-defun my/org-roam-node-find (included-tags excluded-tags)
"Modded org-roam-node-find which filters nodes using tags."
(interactive)
(org-roam-node-find nil nil
(lambda (node) (my/org-roam-node--filter-by-tags node included-tags excluded-tags))))
(cl-defun my/org-roam-node-insert (included-tags excluded-tags)
"Modded org-roam-node-insert which filters nodes using tags."
(interactive)
(org-roam-node-insert
(lambda (node) (my/org-roam-node--filter-by-tags node included-tags excluded-tags))))
(map!
:leader
(:prefix ("r" . "org-roam")
"f" #'(lambda () (interactive) (my/org-roam-node-find nil '("daily" "captures")))
"i" #'(lambda () (interactive) (my/org-roam-node-insert nil '("daily" "captures")))
"F" #'(lambda () (interactive) (my/org-roam-node-find '("daily" "captures") nil))
"I" #'(lambda () (interactive) (my/org-roam-node-insert '("daily" "captures") nil)))