-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Infinite loop with referential input objects and argument authorization #2554
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
Comments
Thanks for the detailed report! You can see I got as far as self-referencing input objects, but not multi-step cycles. On 1.10-dev, argument values are passed along through authorization, so we check for Want to try 1.10.0.pre1? There are some significant changes, which you can see in the changelog: https://github.com/rmosolgo/graphql-ruby/blob/1.10-dev/CHANGELOG.md#1100pre1-10-oct-2019 If that doesn't work, you could also override the changes in that commit in your base InputObject class, eg class Types::BaseInputObject < GraphQL::Schema::InputObject
def self.authorized?(*)
true
end
end Alternatively, if you can imagine some reasonable solution to this issue which works without the changes in 1.10, I'm all ears! |
@rmosolgo 1.10.0.pre1 does indeed fix our problem! Any eta on 1.10.0 would be released? |
I have a checklist, but not a date: #2100 There's still a lot to do 😅 But GitHub is running on 1.10-dev, so you can consider it pretty stable! |
I didn't have luck overriding the class BaseInputObjectArgument < GraphQL::Schema::Argument
def authorized?(*)
true
end
end
class BaseInput < GraphQL::Schema::InputObject
argument_class BaseInputObjectArgument
end |
Say you have a pair of input objects that reference each other as arguments:
We have a number of sets of looping input objects. Sometime pairs. Sometimes groups of three:
A
refers toB
andC
.B
refers toA
andC
.C
refers toA
andB
.We see an infinite loop looking like this:
We believe this is caused by the changes here: 961cb86#diff-5e2d79f8b98d655ddf9d2469210c729d
The text was updated successfully, but these errors were encountered: