Example graphql-query-complexity for NestJS
npm install
npm run start:dev
This project apply simple estimator, default complexity is 1. It increase complexity per retrieving fields.
# complexity: 5
query QueryPosts {
posts {
id
author {
posts {
id
}
}
}
}
# complexity: 10
query QueryAuthors {
authors {
id
name
posts {
author {
name
posts {
id
author {
id
}
}
}
}
}
}