strawberry-graphql / strawberry

A GraphQL library for Python that leverages type annotations 🍓
https://strawberry.rocks
MIT License
3.94k stars 521 forks source link

Feature Request: Cost-based Validators #1396

Open navyamehta opened 2 years ago

navyamehta commented 2 years ago

Hey all! Thank you for such an amazing repo! I noticed there exists support for max-depth validation etc., and was wondering if there was any plan to support cost-based validation? Maybe we place a decorator on each resolver that accepts the parameters passed to the resolver and outputs a floating point cost? Javascript has some amazing libraries for query cost computation that could be ported over? Would love to know thoughts!

Upvote & Fund

Fund with Polar

ehsanonline commented 2 years ago

related to #960