Replies: 3 comments
-
I believe GQL already provides a way to measure performance: https://github.com/99designs/gqlgen/search?q=Tracer See: |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll look into this tomorrow and verify if that lets me do all the measurements :) thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think I might have misunderstood, but doesn't gqlgen/graphql/handler/debug/tracer.go Line 61 in 3a31a75 actually allow me to measure performance of the whole query? what about the sub fields? if they have their own resolvers? The above line helps me to at least keep track of what fields are being used, but how about when user is doing 2 query in single request? In that case, it looks like it's not going to be possible, or if there's a nested graph, say a City belongs to a State in that case, it'll give you result of whole thing, not individual resolvers.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, gqlgen is THE best gql client as of now period. It's mainly because of TypeSafety and schema first design, I love it. There's no question to it. (subscription doesn't seem to be have a documentation though)
What happened?
I want to monitor my queries. For each queries (resolvers called), I'd like to get the time taken before and after for each of those, (I don't want to put this call on each resolvers however), that way I could simply do some measurements and make sure my queries and mutations are behaving correctly.
What did you expect?
I was under the impression that this was going to be a piece of 🍰 , but turns out it's kinda tricky.
I know with the typesafety stuff, it might be a tad difficult, but what do you recommend? Is there something we can do?
Beta Was this translation helpful? Give feedback.
All reactions