How to get nested documents in FaunaDB?
问题 To get a single document in Fauna we do: q.Get(q.Ref(q.Collection('posts'), '192903209792046592')) And we get something like: { data: { title: 'Lorem ipsum', authorId: '892943607792046595' } } Is it possible to instead get the post and the author in the same query? Something like this: { data: { title: 'Lorem ipsum', author: { name: 'John Doe' } } } 回答1: Since this is a common question I'm going to expand it and give you all info that you should need to get started. I recently wrote an