A chain of templates used in j.query
or j.watch
.
Begin the chain by calling j.for
.
Extend it by calling then
.
Build a preposition chain.
function postsByAuthor(a) {
return j.match({
type: 'Blog.Post',
author: a
});
}
function tagsForPost(p) {
return j.match({
type: 'Blog.Post.Tags',
post: p
});
}
const tags = await j.query(person, j
.for(postsByAuthor)
.then(tagsForPost));