Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not that much into GraphQL but I vaguely remember libraries that provide some kind of atteibutes you apply to entities/loaders and then pre-execution an estimated cost is calculated (and aborted if over a specified threshold).


API Platform for PHP is one of those graphql implementations that has a query cost limiter built in (it's binary, it just rejects queries that go over your configured complexity threshold). Shopify's graphql api is even fancier, where every query costs X amount of a limited number of "credits". The structure of gql itself makes costs easier to estimate (you have as many joins as you have bracket pairs, more or less), and some servers can recognize a directive in the schema to declare the "real" cost.


That's sort of my expectation too -- it would be nuts to provide a user facing system without bounds of some sort.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: