agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

Max path depth for "Include" #598

Closed andrus closed 1 year ago

andrus commented 1 year ago

Agrest (just like GraphQL) is prone to "infinite include" problem unless special measures are taken, when a call specifies a very long (possibly circular) include. Previously we've dealt with it with hardcoded path length limit (300 chars). Let's make it more explicit, and allow the users to specify max allowed path "depth" in terms of the number of relationships.