Log which query/mutation fields are used #865
Unanswered
rudiedirkx
asked this question in
Q&A
Replies: 2 comments
-
I'd be interested in that as well, to collect some usage metrics. |
Beta Was this translation helpful? Give feedback.
0 replies
-
What I currently do is Proxy every resolve function to collect metrics... [
"type" => Type:id(),
"resolve" => new ProxyResolver(fn($data, $arguments, $context, $info) => $data['id']),
] |
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
-
Is there a way to detect which path the entire
GraphQL::executeQuery()
took? Right now I do aParser::parse(new Source($input['query']))
and then take the fields from the first definition, but that's not necessarily the used definition. It depends onoperationName
, which is sometimes optional etc etc.Is there a way to let
GraphQL::executeQuery()
do what it does, and then afterwards ask what it did? Which operation, which main/root fields, how many fields in total, the max depth, etc etc?Beta Was this translation helpful? Give feedback.
All reactions