Add a way to record isolated operations
wschurman opened this issue · 0 comments
wschurman commented
While debugging, it would be useful to be able to get information about entity loads/mutations/etc to see things like:
- If it hit the DB, what was the query run
- If it hit or wrote to the cache, what were the cache keys used
- If it only went to the dataloader, indicate as such
- etc...
An API for this could look something like:
const [queryContextAuditResult, entityResultFromInnerBlock] = await withIsolatedQueryContext(async (queryContext) => {
return await BlahEntity.loader(viewerContext, queryContext).load(...);
});
console.log(queryContextAuditResult);