
    ajf                        d dl mZ d dlmZ d dlmZmZmZmZ d dl	m
Z
mZmZmZmZmZmZmZmZmZmZmZ d dlmZ g dZeegee   f   Zedee   f   Z G d d	      Z	 	 	 ddedee   dee   dedee   dee   deeeef      defdZy
)    )Mapping)iscoroutinefunction)AnyCallableDictOptional)resolve_thunkGraphQLArgumentGraphQLFieldGraphQLFieldMapGraphQLInputFieldGraphQLInputFieldMapGraphQLInputObjectTypeGraphQLNonNullGraphQLObjectTypeGraphQLResolveInfoGraphQLStringThunkMapping)AwaitableOrValue) mutation_with_client_mutation_id
MutationFnMutationFnWithoutArgs
NullResult.c                   $    e Zd Zddee   ddfdZy)r   NclientMutationIdreturnc                     || _         y Nr   )selfr   s     l/var/www/html/myl_app/scheduler-service/venv/lib/python3.12/site-packages/graphql_relay/mutation/mutation.py__init__zNullResult.__init__&   s
     0    r   )__name__
__module____qualname__r   strr"    r#   r!   r   r   %   s    1# 1$ 1r#   r   Nnameinput_fieldsoutput_fieldsmutate_and_get_payloaddescriptiondeprecation_reason
extensionsr   c                 R   dt         ffd}dt        ffd}t        | dz   |      }	t        | dz   |      }
t	              rdt
        dt        d	t        dt
        ffd
}ndt
        dt        d	t        dt
        ffd}t        |	||d	t        t        |
            i||      S )aU  
    Returns a GraphQLFieldConfig for the specified mutation.

    The input_fields and output_fields should not include `clientMutationId`,
    as this will be provided automatically.

    An input object will be created containing the input fields, and an
    object will be created containing the output fields.

    mutate_and_get_payload will receive a GraphQLResolveInfo as first argument,
    and the input fields as keyword arguments, and it should return an object
    (or a dict) with an attribute (or a key) for each output field.
    It may return synchronously or asynchronously.
    r   c                  J    t        t               t        t                    S Nr   )dictr	   r   r   )r*   s   r!   augmented_input_fieldsz@mutation_with_client_mutation_id.<locals>.augmented_input_fieldsB   s     ,'.}=
 	
r#   c                  J    t        t               t        t                    S r2   )r3   r	   r   r   )r+   s   r!   augmented_output_fieldszAmutation_with_client_mutation_id.<locals>.augmented_output_fieldsH   s     -()-8
 	
r#   Payload)fieldsInput_rootinfoinputc                    K    |fi | d {   }|j                  d      }|t        |      S t        |t              r||d<   |S ||_        |S 7 BwNr   getr   
isinstancer   r   r:   r;   r<   payloadr   r,   s        r!   resolvez1mutation_with_client_mutation_id.<locals>.resolveU   sk     24A5AAG$yy);<!"233'7+.>*+ N ,<(N Bs   AAAAc                      |fi |}|j                  d      }|t        |      S t        |t              r||d<   |S ||_        |S r>   r?   rB   s        r!   rD   z1mutation_with_client_mutation_id.<locals>.resolvec   s`     -T;U;G$yy);<!"233'7+.>*+ N ,<(Nr#   )r-   r.   argsrD   r/   )r   r   r   r   r   r   r   r   r   r
   r   )r)   r*   r+   r,   r-   r.   r/   r4   r6   output_type
input_typerD   s    ```        r!   r   r   *   s    0
$8 

_ 
 $D9$4=TUK'w?UVJ12		 		,> 		t 		PS 				0	9=		 -~j'ABC r#   )NNN)collections.abcr   inspectr   typingr   r   r   r   graphqlr	   r
   r   r   r   r   r   r   r   r   r   r   graphql.pyutilsr   __all__r   r   r   r'   r   r(   r#   r!   <module>rO      s    # ' 0 0    - !"4!57G7L!LM  c+C001
1 1 "&(,+/M
M01M  -M '	M
 #M !M c3h(M Mr#   