Skip to content

Commit 6e6a4fd

Browse files
committed
updated parameters for weight function in typeComplexity tests
1 parent 1a75e56 commit 6e6a4fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/analysis/typeComplexityAnalysis.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { ArgumentNode, IntValueNode, ValueNode } from 'graphql/language';
2+
import { KEYWORDS } from '../../src/analysis/buildTypeWeights';
13
import getQueryTypeComplexity from '../../src/analysis/typeComplexityAnalysis';
24

35
/**
@@ -102,7 +104,7 @@ const typeWeights: TypeWeightObject = {
102104
fields: {
103105
// FIXME: update the function def that is supposed te be here to match implementation
104106
// FIXME: add the function definition for the 'search' field which returns a list
105-
reviews: (arg, type) => arg * type.weight,
107+
reviews: (args: ArgumentNode[]): number => 10,
106108
},
107109
},
108110
episode: {

0 commit comments

Comments
 (0)