o
    ÚtBh¤  ã                   @  s.   d dl mZ d dlmZmZmZ d
dd„Zd	S )é    )Úannotations)ÚDocumentNodeÚSourceÚparseÚrequest_stringústr | SourceÚreturnr   c                 C  s:   t | tƒr| }t|ƒS t | tƒrt| dƒ}t|ƒS tdƒ‚)aé  Given a string containing a GraphQL request, parse it into a Document.

    :param request_string: the GraphQL request as a String
    :type request_string: str | Source
    :return: a Document which can be later executed or subscribed by a
        :class:`Client <gql.client.Client>`, by an
        :class:`async session <gql.client.AsyncClientSession>` or by a
        :class:`sync session <gql.client.SyncClientSession>`

    :raises GraphQLError: if a syntax error is encountered.
    zGraphQL requestz4Request must be passed as a string or Source object.)Ú
isinstancer   ÚstrÚ	TypeErrorr   )r   Úsource© r   ú^/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/gql/gql.pyÚgql   s   

ü
ÿr   N)r   r   r   r   )Ú
__future__r   Úgraphqlr   r   r   r   r   r   r   r   Ú<module>   s    