Features
Property Depth Limiting
Added the ability to control the maximum depth of nested property access in filters and sorts. This helps protect against deeply nested queries when exposing QueryKit to external consumers.
Usage
// Limit nesting to 2 levels globally
var config = new QueryKitConfiguration(settings =>
{
settings.MaxPropertyDepth = 2;
});
// "Author.Name" works (depth 1)
// "Author.Address.City" works (depth 2)
// "Author.Address.Country.Name" throws QueryKitPropertyDepthExceededException (depth 3)Override the global limit for specific properties:
var config = new QueryKitConfiguration(settings =>
{
settings.MaxPropertyDepth = 1;
settings.Property<Book>(x => x.Author).HasMaxDepth(2); // Allow deeper nesting for Author
});