Proper way of refetching queries after mutation in React + ApolloClient project
问题 Creating an app which allows you to sign up and sign in user in the database. After sign up / sign in process the app moves you to the content. Code for authorization process: const Auth = ({ handleSetAuthorized }) => { const { refetch } = useQuery(CURRENT_USER) const { error } = useSelector(({ error }) => error) const history = useHistory() const dispatch = useDispatch() const [signup] = useMutation(SIGN_UP, { onCompleted: async (data) => { const token = data.signup localStorage.setItem(