Do not get too hung up on Join
which might not be named as well as it could be, since it behaves so differently from SQL. Even Fauna folks admit
It looks like there is a one-to-many relationship between one Book and many Publications, correct? What you need to do is Paginate
the relevant books, Map
over them to query the related Publications and add them to the result.
You can return a javascript like object with the specific values you want, or you can use the Merge
function to easily add new properties to the existing results. See this previous Topic for a related discussion.
You can also refer to this gist, which covers a lot of ways to building queries with nested data.