We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d64adf5 commit f2aea84Copy full SHA for f2aea84
README.md
@@ -125,11 +125,17 @@ import schema from './schema';
125
const app = express();
126
app.use('/api', graphqlHTTP(async (request, response, {variables}) => ({
127
schema,
128
- validationRules: [ queryComplexity({
129
- maximumComplexity: 1000,
130
- variables,
131
- onComplete: (complexity: number) => {console.log('Query Complexity:', complexity);},
132
- }) ]
+ validationRules: [
+ queryComplexity({
+ estimators: [
+ // Configure your estimators
+ simpleEstimator({defaultComplexity: 1})
133
+ ],
134
+ maximumComplexity: 1000,
135
+ variables,
136
+ onComplete: (complexity: number) => {console.log('Query Complexity:', complexity);},
137
+ })
138
+ ]
139
})));
140
```
141
0 commit comments