You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a mutation that accepts an input_field a, which is an input object type with a field b.
In the mutation resolver, the inputs argument is something like this:
calling to_h on it merely returns @hash, so I need to call to_h at every depth.
When calling Arguments.new on a nested hash, it recursively creates Arguments objects when setting @value, but the original is retained in @hash.
However when handling a real request, even the @hash has nested Arguments objects.
Is there some built-in way to unpack the Arguments recursively?
The text was updated successfully, but these errors were encountered:
When I added that feature I just wanted to turn the arguments for my object input types into a hash for Rails' sake, I hadn't considered converting the entire args object. I agree that'd be the expected behaviour. It'd be easy enough to implement if you'd like to have a go.
I have a mutation that accepts an input_field
a
, which is an input object type with a fieldb
.In the mutation resolver, the inputs argument is something like this:
calling
to_h
on it merely returns@hash
, so I need to callto_h
at every depth.When calling
Arguments.new
on a nested hash, it recursively createsArguments
objects when setting@value
, but the original is retained in@hash
.However when handling a real request, even the
@hash
has nestedArguments
objects.Is there some built-in way to unpack the
Arguments
recursively?The text was updated successfully, but these errors were encountered: