def resolve_field_type(field):
    """Keep digging into field type until finding a non-null `name`."""
    type_ = field["type"]
    while type_["name"] is None:
        try:
            type_ = type_["ofType"]
        except:
            return None
    return type_["name"]