Hi!
I'm trying to add some context data to a find operation using the Local API. The collection being queried has a beforeRead hook where context is passed in. However, the context is always undefined in the hook.
Given this code to find a document:
collection,
where: query,
depth: 2,
limit: 1,
context: {
preview
}
});```
And this hook in the collection config:
```hooks: {
beforeRead: [
({ doc, context }) => {
console.log(context)
return doc;
}
]
}```
The console.log always outputs undefined.
Any idea what I'm doing wrong here? Using Payload v1.15.6