Skip to content

Commit 18c06d2

Browse files
committed
removed query variables parameter in complexityAnalysis. An issue for future work
1 parent 3ac1c94 commit 18c06d2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/analysis/typeComplexityAnalysis.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ import { parse } from 'graphql';
1515
* @param {TypeWeightObject} typeWeights
1616
* @param {string} complexityOption
1717
*/
18-
function getQueryTypeComplexity(
19-
queryString: string,
20-
queryVariables: any,
21-
typeWeights: TypeWeightObject
22-
): number {
18+
// TODO add queryVaribables parameter
19+
function getQueryTypeComplexity(queryString: string, typeWeights: TypeWeightObject): number {
2320
throw Error('getQueryComplexity is not implemented.');
2421
}
2522

src/middleware/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export function expressRateLimiter(
6262
const ip: string = req.ips[0] || req.ip;
6363

6464
// FIXME: this will only work with type complexity
65-
const queryComplexity = getQueryTypeComplexity(query, variables, typeWeightObject);
65+
// TODO: add query varibales parameter
66+
const queryComplexity = getQueryTypeComplexity(query, typeWeightObject);
6667

6768
try {
6869
// process the request and conditinoally respond to client with status code 429 o

0 commit comments

Comments
 (0)