{"library":"apollo-server-plugin-query-complexity","type":"library","category":null,"description":"The `apollo-server-plugin-query-complexity` package provides a plugin for `@apollo/server` to enforce query complexity limits, safeguarding against overly resource-intensive queries. It is currently at version 4.0.0, aligning with `@apollo/server` v4.x. This plugin differentiates itself by being fully compatible with GraphQL operation variables, a feature that standard `graphql-js` validation rules cannot directly access when integrated with Apollo Server. It leverages `graphql-query-complexity` for its core estimation logic, supporting various estimators like `directiveEstimator` and `simpleEstimator`, which allow developers to define complexity values directly within their schema or through default calculation rules. This mechanism is crucial for preventing denial-of-service attacks by ensuring server stability and fair resource allocation. The project appears actively maintained, with releases typically synchronized with major `@apollo/server` versions.","language":"javascript","status":"active","version":"4.0.0","tags":["javascript","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install apollo-server-plugin-query-complexity","imports":["import ApolloServerPluginQueryComplexity from 'apollo-server-plugin-query-complexity';","import { QueryComplexityError } from 'apollo-server-plugin-query-complexity';","import { directiveEstimator, simpleEstimator } from 'graphql-query-complexity';"]},{"cmd":"yarn add apollo-server-plugin-query-complexity","imports":[]},{"cmd":"pnpm add apollo-server-plugin-query-complexity","imports":[]}],"homepage":null,"github":"https://github.com/nvdaz/apollo-server-plugin-query-complexity","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/apollo-server-plugin-query-complexity","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/apollo-server-plugin-query-complexity/compatibility"}}