You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cost complexity cost-limit plugin does not take into account how many entities are being returned when either the first or last argument are specified at the field level.
These two examples which have the same complexity cost (I have omitted edges and pageInfo to keep these examples simple)
query simpleQuery {
books {
title
author
}
}
query connectionQuery {
books(first: 1) {
title
author
}
}
The cost complexity of this query should increase by a factor of the number of books requested
query connectionQuery {
books(first: 3) {
title
author
}
}
I have a PR that modifies the computeComplexity function in packages/plugins/cost-limit/src/index.ts/ to factor this in to the complexity cost algorithm.
Note the PR does not currently handle VariableDefinitions but will handle the example above
The text was updated successfully, but these errors were encountered:
The cost complexity
cost-limit
plugin does not take into account how many entities are being returned when either thefirst
orlast
argument are specified at the field level.These two examples which have the same complexity cost (I have omitted
edges
andpageInfo
to keep these examples simple)The cost complexity of this query should increase by a factor of the number of books requested
I have a PR that modifies the
computeComplexity
function inpackages/plugins/cost-limit/src/index.ts/
to factor this in to the complexity cost algorithm.Note the PR does not currently handle
VariableDefinitions
but will handle the example aboveThe text was updated successfully, but these errors were encountered: