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
I tried to add that to this package here but ended up building my own validator that has support for args, variables and custom settings per field, similar to the implementation of the sangria library: https://github.com/ivome/graphql-query-complexity
With Apollo Server, creating a new validation rule per request is tricky. In general, it's also not easy to get the relevant variables for a batch request.
I'm going to instead build this as a per-request (in batch) extension that sets variables onto a singleton before and after the validation phase.
This should be okay, given that validation is synchronous anyway.
No description provided.
The text was updated successfully, but these errors were encountered: