Is there any way to perform queries on pointers more performant. Lets say we have a collection called blog posts which references another by pointer collection called categories, in order to retrieve all the references i must do a for loop over books and then perform away on each books reference to categories which can be quite slow depending on the number of books I have. for example
... query for books
for (let index = 0; index < books.length; index++) {
const book = books[index];
let cat = book.get('category')
cat = await cat.fetch(masterKey)
... do stuff with category before reassigning back to book object
let refactorBook = JSON.parse(JSON.stringify(book))
refactorBook = { ...refactorBook, category }
returnBooks.push(refactorBook)
}