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

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

        Returns
        -------
        :class:`~github.query.QueryArgument`
            The query argument object.
        """
    name = data['name']
    type = data['type']
    default = data.get('default', None)
    argument = cls(name=name, type=type, default=default)
    return argument
