-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
copy complexity to RequestContext #403
Conversation
I want to see the complexity of each path, but it looks difficult 🤔 |
@@ -17,6 +17,10 @@ type RequestContext struct { | |||
RawQuery string | |||
Variables map[string]interface{} | |||
Doc *ast.QueryDocument | |||
|
|||
ComplexityLimit int |
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.
why is ComplexityLimit here, its static?
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.
Yes it's static value determined at compile time.
BTW, I want to modify it on run time...
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.
BTW, I want to modify it on run time...
🤔
when? ideally a request over the limit doesn't run anything, especially not in the resolver stack.
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.
For example, If we want to change ComplexityLimit between 1st party client and 3rd party client.
copy complexity to RequestContext
I want to get access to operation complexity on Tracing.
I have: