o
    ÑtBh?  ã                   @   sH   d dl mZ ddlmZmZ dgZ	d
dedee dee fd	d„ZdS )é    )ÚOptionalé   )ÚDocumentNodeÚOperationDefinitionNodeÚget_operation_astNÚdocument_astÚoperation_nameÚreturnc                 C   sP   d}| j D ] }t|tƒr%|du r|r dS |}q|jr%|jj|kr%|  S q|S )zÛGet operation AST node.

    Returns an operation AST given a document AST and optionally an operation
    name. If a name is not provided, an operation is only returned if only one
    is provided in the document.
    N)ÚdefinitionsÚ
isinstancer   ÚnameÚvalue)r   r   Ú	operationÚ
definition© r   úz/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/graphql/utilities/get_operation_ast.pyr      s   	

€)N)Útypingr   Úlanguager   r   Ú__all__Ústrr   r   r   r   r   Ú<module>   s    ÿÿÿþ