Information Technology & Services - New York, New York, United States
We are a small team of developers working on SmartGraphQL - Node.js module, which enables users to limit the depth and complexity of queries to their GraphQL server, preventing resource exhaustion.When queries are received by the server, the library will calculate their cost and depth and compare it against the user's limits to execute or reject the query. Both calculations involve parsing through each node of the Abstract Syntax Tree. Calculating depth complexity is similar to finding the depth of a Binary Search Tree, every time a GraphQL object type is encountered, the complexity is incremented. Cost on the other hand involves tracking specific arguments of GraphQL object types and using them to estimate the number of resolvers that will be executed when querying the database.