Skip to content

Commit b0bfce0

Browse files
committed
responded to comments in PR #79
1 parent e98203d commit b0bfce0

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/analysis/buildTypeWeights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const defaultTypeWeightsConfig: TypeWeightSet = {
5454
* @param {(GraphQLObjectType | GraphQLInterfaceType)} type
5555
* @param {TypeWeightObject} typeWeightObject
5656
* @param {TypeWeightSet} typeWeights
57-
* @param enforceBoundedLists
57+
* @param {boolean} enforceBoundedLists
5858
* @return {*} {Type}
5959
*/
6060
function parseObjectFields(

src/utils/redis.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ const clients: Redis[] = [];
88
*/
99
export function connect(options: RedisOptions): Redis {
1010
// TODO: Figure out what other options we should set (timeouts, etc)
11-
try {
12-
const client: Redis = new Redis(options); // Default port is 6379 automatically
13-
clients.push(client);
14-
return client;
15-
} catch (err) {
16-
throw new Error(`Error in expressGraphQLRateLimiter when connecting to redis: ${err}`);
17-
}
11+
const client: Redis = new Redis(options); // Default port is 6379 automatically
12+
clients.push(client);
13+
return client;
1814
}
1915

2016
/**

test/analysis/typeComplexityAnalysis.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ describe('Test getQueryTypeComplexity function', () => {
871871
}
872872
}
873873
}`;
874-
mockCharacterFriendsFunction.mockReturnValueOnce(3);
874+
expect(mockCharacterFriendsFunction).toHaveBeenCalledTimes(0);
875875
// Query 1 + 1 hero + max(...Character 3, ...Human 0) = 5
876876
expect(queryParser.processQuery(parse(query))).toBe(5);
877877

@@ -909,7 +909,7 @@ describe('Test getQueryTypeComplexity function', () => {
909909
}
910910
}
911911
}`;
912-
mockCharacterFriendsFunction.mockReturnValueOnce(3);
912+
expect(mockCharacterFriendsFunction).toHaveBeenCalledTimes(0);
913913
// Query 1 + 1 hero = 2
914914
expect(queryParser.processQuery(parse(query))).toBe(2);
915915

0 commit comments

Comments
 (0)