0
<MaterialTable
        
            rowData => ({
              icon: () => 
              
              <DeleteOutline    color='action' />,
              tooltip: 'Delete User',
              
               onClick: (event, rowData) => {

                event.stopPropagation();
        
           <Mutation // this is not executing
                mutation={delete_users}
                 variables={{input: rowData.userid}} >
                    {(deleteCdeUser, { loading, error, data }) => 
                       { 
                                          
                        console.log(data); // here i should get the data
                       }}
               </Mutation>
                
              }  
            })
          ]}
  /> 

The mutaion doesnt execute at all at the below point. I am newbie to the graphql and apollo. Any help would be much appreciated

Ram
  • 356
  • 2
  • 14
  • It looks like you have that element in the onClick callback. What is it doing? – possum Jul 01 '20 at 13:04
  • yes, it would help where the mutation component should be placed. the onclick event is from materialtable. I wanted to run the mutation when click of the icon. – Ram Jul 01 '20 at 13:09

0 Answers0