@classmethod
def from_dict(cls, data: dict) ->'Field':
    """
        Creates a :class:`~github.query.Field` object from a dict.

        Parameters
        ----------
        data: :class:`dict`
            The dict to convert into a :class:`~github.query.Field`.

        Returns
        -------
        :class:`~github.query.Field`
            The field object.
        """
    name = data['name']
    alias = data.get('alias', None)
    field = cls(name=name, alias=alias)
    return field
