Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to record isolated operations #48

Open
wschurman opened this issue Jun 18, 2020 · 0 comments
Open

Add a way to record isolated operations #48

wschurman opened this issue Jun 18, 2020 · 0 comments

Comments

@wschurman
Copy link
Member

wschurman commented Jun 18, 2020

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant