The properties (attributes) in logseq are already inherited. the default simple query only assumes inheritance of two or three levels (I can’t remember at all) but with advanced queries the inheritance can extend to the deepest children:
the following example is from logseq discord’s #queries channel:
If the parent block has property author and the child has property book —
{:query [:find (pull ?author-block [*])
:in $ %
:where
(property ?author-block :author "Oscar Wilde")
(property ?book-block :type "book")
(parent ?author-block ?book-block)]
:rules [[(parent ?p ?c) [?c :block/parent ?p]]
[(parent ?p ?c) [?c :block/parent ?t] (parent ?p ?t)]]}