title: Delete Data using react.js and graphql
body: <p>I would like to ask why I cannot delete data on graphql using react.js and apollo?...
  The code doesn't give any errors...
  I have tried deleting on graphiql and on django-admin(server-side)and it works just fine...</p>
  <pre><code>const QUERY_CLIENTS = gql`
  query{
    allClients{
      id
      age
      name
      gender
      homeAddress
      contactNumber
      emailAddress
    }
  }
  `;
  const DELETE_CLIENT = gql`
  mutation deleteClient($id: Int!){
    deleteClient(id:$id){
      client{
        id
      }
    }
  }
  `;
  function DisplayClients(){
    const {loading, error, data} = useQuery(QUERY_CLIENTS);
    const [deleteClient] = useMutation(DELETE_CLIENT);
  
    const removeClient = (id) =&gt; {
      deleteClient(
        {
          variables: {
            id: id
          }
        }
      );
      window.location.reload();
    }
  
    if (loading) return &lt;p&gt;loading...&lt;/p&gt;;
    if(error) return &lt;p&gt;Error: (&lt;/p&gt;;
  
    return data.allClients.map(({id, age, name, gender, homeAddress, contactNumber, emailAddress}) =&gt; (
      &lt;div key={id}&gt;
        &lt;p&gt;
          {id} {name} {age} {gender} {homeAddress} {contactNumber} {emailAddress}
          &lt;button onClick={() =&gt; removeClient(id)}&gt;Delete&lt;/button&gt;
        &lt;/p&gt;
      &lt;/div&gt;
      
    ));
  }
  </code></pre>
  <p>Thank you :)</p>