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
Since tartiflette allow us to deal only with dict. Resolving the __typename field for an UnionType is difficult and is delegate to the Resolver implementation which need to return the __typename in the resolved value.
Maybe we could add an optional resolve_type argument to the Resolver decorator which could take a callable in charge of determining the __typename to return for the resolved value? This resolve_type parameter could be required for an UnionType resolver which returns a value where the __typename couldn't be resolved by the default resolve_type function (a dict without a __typename key for instance).
Since
tartiflette
allow us to deal only withdict
. Resolving the__typename
field for anUnionType
is difficult and is delegate to theResolver
implementation which need to return the__typename
in the resolved value.Maybe we could add an optional
resolve_type
argument to theResolver
decorator which could take a callable in charge of determining the__typename
to return for the resolved value? Thisresolve_type
parameter could be required for anUnionType
resolver which returns a value where the__typename
couldn't be resolved by the defaultresolve_type
function (adict
without a__typename
key for instance).The text was updated successfully, but these errors were encountered: