Skip to content

Commit d696e00

Browse files
committed
renamed ASTParser to only export new name
1 parent 9fbdfd2 commit d696e00

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node_js:
88
branches:
99
only:
1010
- dev
11-
# - main
11+
- main
1212
# scripts to run for each test
1313
script:
1414
- echo "Running tests against $(node -v) ..."

src/analysis/ASTParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { FieldWeight, TypeWeightObject, Variables } from '../@types/buildTypeWei
3131
* |-------------------|
3232
*/
3333

34-
class ComplexityAnalysis {
34+
class ASTParser {
3535
private typeWeights: TypeWeightObject;
3636

3737
private depth: number;
@@ -306,4 +306,4 @@ class ComplexityAnalysis {
306306
}
307307
}
308308

309-
export default ComplexityAnalysis;
309+
export default ASTParser;

src/middleware/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import setupRateLimiter from './rateLimiterSetup';
77
import { ExpressMiddlewareConfig, ExpressMiddlewareSet } from '../@types/expressMiddleware';
88
import { RateLimiterResponse } from '../@types/rateLimit';
99
import { connect } from '../utils/redis';
10-
import ComplexityAnalysis from '../analysis/ASTParser';
10+
import ASTParser from '../analysis/ASTParser';
1111

1212
/**
1313
* Primary entry point for adding GraphQL Rate Limiting middleware to an Express Server
@@ -165,7 +165,7 @@ export default function expressGraphQLRateLimiter(
165165
res.status(400).json({ errors: validationErrors });
166166
}
167167

168-
const queryParser = new ComplexityAnalysis(typeWeightObject, variables);
168+
const queryParser = new ASTParser(typeWeightObject, variables);
169169
const queryComplexity = queryParser.processQuery(queryAST);
170170

171171
try {

0 commit comments

Comments
 (0)