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

Generate metrics for requested fields #404

Closed
robrichard opened this issue Jun 11, 2016 · 2 comments
Closed

Generate metrics for requested fields #404

robrichard opened this issue Jun 11, 2016 · 2 comments

Comments

@robrichard
Copy link
Contributor

It would be useful to know which parts of the schema are in use on production apps by logging which fields are requested. I'd like to build something similar to what @leebyron describes here: https://youtu.be/5pMDd1t2thc?t=35m30s

I think for a given query and schema, I would want a map of each type that is used in the query and the fields that are requested on that type. What is the best way to go about it?

A few ideas are

  • A way to "wrap" the internals that invoke the resolve method, and keep a tally of each time its called on which types
  • Analyze the AST of the entire query and derive it from this. I don't think the AST is schema aware so you can't map the fields back to their types

What do you recommend?

@KyleAMathews
Copy link

@robrichard I recommend you wait until this PR is merged and released :-) #402

@robrichard
Copy link
Contributor Author

That's great! I'll close this and follow that PR.

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

2 participants