Skip to content

Commit e94716d

Browse files
authored
Merge pull request #653 from dkleissa/master
Update middleware example to support introspection
2 parents a0fc843 + 035ff7e commit e94716d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/execution/middleware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ logs the time it takes to resolve each field
5757
return_value = next(root, info, **args)
5858
duration = timer() - start
5959
logger.debug("{parent_type}.{field_name}: {duration} ms".format(
60-
parent_type=root._meta.name if root else '',
60+
parent_type=root._meta.name if root and hasattr(root, '_meta') else '',
6161
field_name=info.field_name,
6262
duration=round(duration * 1000, 2)
6363
))

0 commit comments

Comments
 (0)