This application was deprecated on March 14th 2024, there will be no further dependency or security updates.
This repo contains demonstration code for using the module graphql-query-complexity
with Apollo Server
in order to constrain the query complexity accepted by a GraphQL API to prevent DoS type attacks. This is heavily inspired by the example given in MichalLytek/type-graphql
.
The example can be run with:
npm start
and viewed at the graphql playground at http://localhost:3000/graphql