You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for reporting this. I agree that complexity should handle introspection similar to depth. I'm not sure why that method is skipped for introspection fields... I would have guessed that it worked the same as anything else!
Feel free to take a try at addressing this if you have time before I do, otherwise, I'll follow up here after I make time to investigate.
Also, I added a spec for complexity_for in 3afe931. It "works" -- but you have to set up your base field class using field_class. Also, I discovered some weirdness where you have to use GraphQL::Schema::LateBoundType.new(...) in order to use the built-in types from GraphQL-Ruby. If you reference them directly, it doesn't work.
I hope one of those options works for you -- please let me know if it doesn't!
Currently, count_introspection_fields is only supported for max_depth.
Also, overriding complexity calculation doesn't work for introspection, it seems that this is never called.
Would be nice to find a way how to support both, max_depth and max_complexity.
Thanks a lot
The text was updated successfully, but these errors were encountered: