File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
examples/northwind/models Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ EmployeeTC.getResolver('pagination').extensions = {
7272 complexity : ( { args, childComplexity } ) => childComplexity * ( args . perPage || 20 ) ,
7373} ;
7474EmployeeTC . getResolver ( 'findMany' ) . extensions = {
75- complexity : ( { args, childComplexity } ) => childComplexity * ( args . limit || 1000 ) ,
75+ complexity : ( { args, childComplexity } ) => childComplexity * 100 ,
7676} ;
7777
7878const findManyResolver = EmployeeTC . getResolver ( 'findMany' ) . addFilterArg ( {
@@ -101,6 +101,9 @@ EmployeeTC.addRelation('chief', {
101101 sort : null ,
102102 } ,
103103 projection : { reportsTo : true } ,
104+ extensions : {
105+ complexity : 1 ,
106+ } ,
104107} ) ;
105108
106109EmployeeTC . addRelation ( 'subordinates' , {
@@ -109,6 +112,9 @@ EmployeeTC.addRelation('subordinates', {
109112 filter : ( source ) => ( { reportsTo : source . employeeID } ) ,
110113 } ,
111114 projection : { employeeID : true } ,
115+ extensions : {
116+ complexity : 1 ,
117+ } ,
112118} ) ;
113119
114120EmployeeTC . addRelation ( 'orderConnection' , {
You can’t perform that action at this time.
0 commit comments