Skip to content

Commit 7b05588

Browse files
committed
finished writing an overview of implementation for buildTypeWeightsFromSchema function
1 parent 43e0dd2 commit 7b05588

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/analysis/buildTypeWeights.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import { GraphQLSchema } from 'graphql/type/schema';
22

33
/**
4-
* The default type weights object is based off of Shopifys implewentation of query
4+
* The default typeWeightsConfig object is based off of Shopifys implementation of query
55
* cost analysis. Our function should input a users configuration of type weights or fall
6-
* back on shopifys on
6+
* back on shopifys settings. We can change this later.
7+
*
8+
* This function should
9+
* - itreate through the schema object and create the typeWeightObject as described in the tests
10+
* - validate that the typeWeightsConfig parameter has no negative values (throw an error if it does)
11+
*
12+
* @param schema
13+
* @param typeWeightsConfig
714
*/
815
function buildTypeWeightsFromSchema(
916
schema: GraphQLSchema,

0 commit comments

Comments
 (0)