We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tried to use query complexity limitations on a field returning paginated nodes using cursor connections :
https://async-graphql.github.io/async-graphql/en/depth_and_complexity.html#limiting-query-complexity https://async-graphql.github.io/async-graphql/en/cursor_connections.html
IMHO, we should be able to limit here based on some first, last parameters.
first, last
the complexity computation ComplexityType::Fn is ignored in the complexity visitor here :
ComplexityType::Fn
async-graphql/src/validation/visitors/complexity.rs
Line 64 in a278cc1
Because the result type of the query is of type async_graphql::Result<Connection<usize, SomeOtherType, EmptyFields, EmptyFields>>
async_graphql::Result<Connection<usize, SomeOtherType, EmptyFields, EmptyFields>>
use some #[graphql(complexity = "... some_function_call() ... * child_complexity")] https://async-graphql.github.io/async-graphql/en/depth_and_complexity.html#limiting-query-complexity https://async-graphql.github.io/async-graphql/en/cursor_connections.html
#[graphql(complexity = "... some_function_call() ... * child_complexity")]
both at the same time on a field.
the complexity will be ignored.
The text was updated successfully, but these errors were encountered:
If I remove the condition, the expected behavior happens. Perhaps it's a quick fix ? Is this condition really an expected limitation ?
Sorry, something went wrong.
Hello ? @sunli829 ? Any idea about this one ? Would you prefer a PR ?
Anyone here with some thoughts about this ? I strongly thinks it's a bug, and an easy one to kill, but no-one cares ?
I'm so sorry to see this just now, I'll check tomorrow to see if this condition is really necessary. 🙂
I was probably confused at the time. 😂
dc50049
Thank you @sunli829 !
No branches or pull requests
Expected Behavior
Tried to use query complexity limitations on a field returning paginated nodes using cursor connections :
https://async-graphql.github.io/async-graphql/en/depth_and_complexity.html#limiting-query-complexity
https://async-graphql.github.io/async-graphql/en/cursor_connections.html
IMHO, we should be able to limit here based on some
first, last
parameters.Actual Behavior
the complexity computation
ComplexityType::Fn
is ignored in the complexity visitor here :async-graphql/src/validation/visitors/complexity.rs
Line 64 in a278cc1
Because the result type of the query is of type
async_graphql::Result<Connection<usize, SomeOtherType, EmptyFields, EmptyFields>>
Steps to Reproduce the Problem
use some
#[graphql(complexity = "... some_function_call() ... * child_complexity")]
https://async-graphql.github.io/async-graphql/en/depth_and_complexity.html#limiting-query-complexity
https://async-graphql.github.io/async-graphql/en/cursor_connections.html
both at the same time on a field.
the complexity will be ignored.
The text was updated successfully, but these errors were encountered: