Company
Date Published
Author
Vivek Ravishankar
Word count
583
Language
English
Hacker News points
None

Summary

Vivek Ravishankar of Apollo GraphOS is introducing a new feature to prevent misuse of GraphQL APIs by implementing operation size and complexity limits in the graph router itself, providing an additional layer of security for subgraphs, while also centralizing control over these limits across the entire federated graph. This feature allows users to limit the depth, height, number of root fields, and number of aliased fields of any incoming GraphQL operation, rejecting it if it exceeds any of the set limits with a 400 BAD_REQUEST status code, thus alleviating the burden of coordinating limits across every subgraph and making it easier to standardize policies for a large graph. The feature is available now in preview for all users with a GraphOS Enterprise plan, and detailed information about configuring limits can be found in the documentation for the `router.yaml` file.