-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
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
Max path depth for "Include" #598
Milestone
Comments
andrus
added a commit
that referenced
this issue
Jan 15, 2023
attaching depth policy to SelectContext
andrus
added a commit
that referenced
this issue
Jan 15, 2023
processing the depth policy in the merger
andrus
added a commit
that referenced
this issue
Jan 15, 2023
renaming "max include" to "max path" depth
andrus
added a commit
that referenced
this issue
Jan 15, 2023
processing the depth policy in the merger
andrus
added a commit
that referenced
this issue
Jan 31, 2023
.. a test that default includes still work
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
0
depth means no relationships,1
means only direct relationships, etc.100
. Max possible depth isInteger.MAX_VALUE
, which should be enough for any practical cases.The text was updated successfully, but these errors were encountered: