entity icon indicating copy to clipboard operation
entity copied to clipboard

Add a way to record isolated operations

Open wschurman opened this issue 4 years ago • 0 comments

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);

wschurman avatar Jun 18 '20 21:06 wschurman