async function getPostWithAuthor(postId: string) {
// Get the post
const [post, postError] = await nc.query.blog.get(postId);
if (postError) throw postError;
// Get the author
const [author, authorError] = await nc.query.authors.get(post.properties.authors[0]);
if (authorError) throw authorError;
return {
...post,
author
};
}