-
Notifications
You must be signed in to change notification settings - Fork 180
Add execution path information to Info variable #148
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 execution path information to Info variable #148
Conversation
294ea9b
to
1ef9cd3
Compare
545e1e6
to
e5f52ab
Compare
e5f52ab
to
c67320c
Compare
@syrusakbary I think this is ready for your review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, and nice work on the test!
This is awesome, @ekampf! @syrusakbary, any thoughts on merging this PR? |
@syrusakbary ping |
The PR looks great! I'm a bit worried about the performance in big outputs, but I guess is better try and see :) |
yey! :) |
@ekampf thanks for this, and to @syrusakbary & @brentmclark too of course! I see you implemented a If possible I'd like to get a bit of background on graphql-server-core. How all the different packages interact is something that has taken me a while to figure out. I'm using graphene 2.0.1, graphene-django 2.0 and graphql-core 2.0.1, but as far as I can tell graphql-server-core is not used. Does anybody have an insight into how it fits in here? |
@joealcorn just came across an exact same question after few hours of digging around and trying to figure out which package does what :) Looks like we're trying to do the same thing, and came to the same conclusions. Let me know if you need any help and I'd be quite happy to collaborate on this! |
@joealcorn @olasitarska to my understanding, |
I have no numbers, but I would hazard a guess that many (most?) people using graphql-core are using django & graphene-django who won't be able to benefit from this (as it doesn't appear to use graphql-server-core). Perhaps the tracing middleware could be extracted to a separate library and installed alongside grapqhl-core as an extra? Like In the meantime my fork appears to work well (seems to be reporting correctly at least) which uses your work @ekampf |
@joealcorn why not have Did you use the tracing middleware with Apollo Optics? it works? |
I assume that's the long term plan and probably a good direction to go. If memory serves I'm stuck on an old version of graphene/graphene-django for a while (old django version) so that may not work for me just yet.
Yes, it seems to work fine with apollo engine (formerly optics). I had to make some small tweaks (like changing from ms to ns) Here's a screenie of the trace view working: |
@joealcorn woa! awesome! |
@ekampf Good idea, I will get on that later this week |
path
variable toResolveInfo
to be used for tracing and error informationextensions
toExecutionResult
to allow adding extension data to graphql resultsThe path information. is useful for implementing Tracing (in a separate PR under
graphql-server-core
) and better error information as specified in issues #127 and #131