def graphql_attr_field(
        attr_name, field_name, field_type, description=None,
        is_deprecated=False, deprecation_reason=None):
    """Annotate a class's attribute as corresponding to a GraphQL field.

    The field appears in the GraphQL types for any of the class's
    subclasses that are annotated with graphql_object or
    graphql_interface.  The value of the field for a particular object
    is equal to the value of the attribute of the Python object, as in
    getattr.

    basestring attr_name - The name of the attribute.
    basestring field_name - The name of the GraphQL field.
    basestring field_type - The GraphQL type of the field's value.
    basestring description - A description of the field, or None.
        GraphQL favors the Markdown format.
    bool is_deprecated - Whether the field is deprecated.
    basestring deprecation_reason - An indication of why the field is
        deprecated, or None.  This is None if is_deprecated is False.
    """
    def decorator(cls):
        if '_graphql_attr_fields' not in cls.__dict__:
            cls._graphql_attr_fields = []
        cls._graphql_attr_fields.append({
            'attr': attr_name,
            'deprecationReason': deprecation_reason,
            'description': description,
            'fieldName': field_name,
            'fieldType': field_type,
            'isDeprecated': is_deprecated,
        })
        return cls
    return decorator