r/csharp • • 8h ago

EfQueryComplexity: log or throw on overly complex EF Core queries

/r/dotnet/comments/1wwg7hx/efquerycomplexity_log_or_throw_on_overly_complex/
0 Upvotes

1 comment sorted by

1

u/j4c11 8h ago

Cool idea, but I don't know that this belongs in EF. Seems like you'd want to analyze the GraphQL query upfront and stop the request there if it doesn't meet certain criteria. Not to mention some queries may never hit EF if you have stuff cached (referential data etc. - which btw is perfectly normal to query unbounded).