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 = {
72
72
complexity : ( { args, childComplexity } ) => childComplexity * ( args . perPage || 20 ) ,
73
73
} ;
74
74
EmployeeTC . getResolver ( 'findMany' ) . extensions = {
75
- complexity : ( { args, childComplexity } ) => childComplexity * ( args . limit || 1000 ) ,
75
+ complexity : ( { args, childComplexity } ) => childComplexity * 100 ,
76
76
} ;
77
77
78
78
const findManyResolver = EmployeeTC . getResolver ( 'findMany' ) . addFilterArg ( {
@@ -101,6 +101,9 @@ EmployeeTC.addRelation('chief', {
101
101
sort : null ,
102
102
} ,
103
103
projection : { reportsTo : true } ,
104
+ extensions : {
105
+ complexity : 1 ,
106
+ } ,
104
107
} ) ;
105
108
106
109
EmployeeTC . addRelation ( 'subordinates' , {
@@ -109,6 +112,9 @@ EmployeeTC.addRelation('subordinates', {
109
112
filter : ( source ) => ( { reportsTo : source . employeeID } ) ,
110
113
} ,
111
114
projection : { employeeID : true } ,
115
+ extensions : {
116
+ complexity : 1 ,
117
+ } ,
112
118
} ) ;
113
119
114
120
EmployeeTC . addRelation ( 'orderConnection' , {
You can’t perform that action at this time.
0 commit comments