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
To implement person { married }, you would need to create a new resolver returning parent.state.married, and in a large schema, there are many of these trivial resolvers.
It would be great if set_alias supported nested attributes, so one could do person.set_alias("married", "state.married"), maybe using operator.attrgetter instead of getattr.
The text was updated successfully, but these errors were encountered:
I have a use case where the parent resolver returns something like this:
Person(name="John", state=PersonState(married=False))
To implement
person { married }
, you would need to create a new resolver returningparent.state.married
, and in a large schema, there are many of these trivial resolvers.It would be great if
set_alias
supported nested attributes, so one could doperson.set_alias("married", "state.married")
, maybe usingoperator.attrgetter
instead ofgetattr
.The text was updated successfully, but these errors were encountered: