
    aj                     N    d dl Z ddlmZmZmZ ddlmZ ddlmZ  G d de      Z	y)    N   )FieldInputObjectTypeString)Mutation)maybe_thenablec                   P     e Zd Z G d d      Ze	 d fd	       Zed        Z xZS )ClientIDMutationc                       e Zd ZdZy)ClientIDMutation.MetaTN)__name__
__module____qualname__abstract     d/var/www/html/myl_app/scheduler-service/venv/lib/python3.12/site-packages/graphene/relay/mutation.pyMetar   	   s    r   r   c           
         t        | dd       }t        j                  dd|xs | j                        }|rJ d       |rJ d       t        f}|r||fz  }|si }t        | d|t        |t        d                  | _        t        | j                  d	
            }t        | dd       }	| j                  rK| j                  j                  t        j                  j                  k(  r|	sJ |xs | j                   d       |s| d}t        t        | 6  dd ||d| t        t        d      | j                  j                   d<   y )NInputzPayload$ zCan't specify any outputzCan't specify any argumentsclientMutationId)name)client_mutation_idT)required)inputmutate_and_get_payloadzA.mutate_and_get_payload method is required in a ClientIDMutation.Payload)output	argumentsr   r   r   )getattrresubr   r   typedictr   r   mutate__func__r
   super__init_subclass_with_meta__r   _metafields)clsr   input_fieldsr    r   optionsinput_class	base_namebasesr   	__class__s             r   r)   z,ClientIDMutation.__init_subclass_with_meta__   s`    c7D1FF:r4+?3<<@	555z;;;} "k^#ELk&>P2QR
	 ))T)*
	 ").F!M::#**--1A1H1H1Q1QQ) '3<<( )* *)
 [(D@ 	
94	
;B	
 27vDV1W		-.r   c                 N    fd} | j                   ||fi }t        ||      S )Nc                 ~    	 j                  d      | _        | S # t        $ r t        dt        |              w xY w)Nr   z4Cannot set client_mutation_id in the payload object )getr   	Exceptionrepr)payloadr   s    r   
on_resolvez+ClientIDMutation.mutate.<locals>.on_resolve8   sN    -2YY7K-L*
 N	  J4PW=/Z s    !<)r   r   )r,   rootinfor   r9   results      `  r   r&   zClientIDMutation.mutate6   s0    	 ,++D$@%@fj11r   )NNNN)r   r   r   r   classmethodr)   r&   __classcell__)r2   s   @r   r
   r
      s;      BF'X 'XR 2 2r   r
   )
r"   typesr   r   r   types.mutationr   utils.thenablesr   r
   r   r   r   <module>rB      s     	 2 2 % ,:2x :2r   