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
classBookOut(Scheme):
authors: list[str] =list()
@staticmethoddefresolve_authors(obj):
authors= []
forauthorinobj.authors.all():
# this will cause AttributeErrorautrhos.append(author.nonexisting_attribute)
returnauthors
When there is AttributeError in the resolver AND the authors fields has default value, the error will be silenced and there will be empty list in result.authors. Why is that? Personally I would like to know if there are any errors occurring in resolve_* method, disregarding if the field has default or not.
The text was updated successfully, but these errors were encountered:
Let's consider this example:
When there is AttributeError in the resolver AND the
authors
fields has default value, the error will be silenced and there will be empty list in result.authors. Why is that? Personally I would like to know if there are any errors occurring inresolve_*
method, disregarding if the field has default or not.The text was updated successfully, but these errors were encountered: