title: Unhandled Rejection (TypeError): Cannot read property 'refetch' of undefined - GraphQL
body: <p>Today I faced an issue with GraphQL in my React.js project. What I tried to do is refetch a query once a mutation is completed. My codebase is as below</p>
  
  <pre class="lang-js prettyprint-override"><code>const getUserTeamQuery = useQuery(getUserTeam(usersFragment))
  const data = get(getUserTeamQuery, 'data.getUserTeam')
  
  const [updateUser] = useMutation(updateUserMutation(usersFragment), {
    onCompleted: () =&gt; {
      getUserTeamQuery.refetch()
    }
  })
  
  const updateTeam = async () =&gt; {
    await updateUser({ variables: { input: { pullTeam } } })
  }
  
  </code></pre>
  
  <p>I've also posted this issue in Github: <a href="https://github.com/apollographql/react-apollo/issues/3862" rel="nofollow noreferrer">https://github.com/apollographql/react-apollo/issues/3862</a></p>
  
  <p><strong>DEPENDENCIES</strong></p>
  
  <pre class="lang-sh prettyprint-override"><code>"@apollo/react-hooks": "^3.1.3",
  "apollo-cache-inmemory": "^1.6.3",
  "apollo-client": "^2.6.4",
  "apollo-link": "^1.2.13",
  "apollo-link-context": "^1.0.19",
  "apollo-link-error": "^1.1.12",
  "apollo-link-http": "^1.5.16",
  "apollo-upload-client": "^11.0.0",
  "react": "^16.10.2",
  "react-apollo": "^3.1.3",
  </code></pre>
  
  <p>Is there any solution to fix the issue?</p>