menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
# All channels
view-forward
# General
view-forward
# Apollo Angular
view-forward
# Announcements
view-forward
# Apollo Android
view-forward
# Apollo Client
view-forward
# Apollo iOS
view-forward
# Apollo Link
view-forward
# Apollo Link Rest
view-forward
# Local State
view-forward
# Apollo Studio
view-forward
# Apollo Server
view-forward
# Apollo Tooling
view-forward
# Contributing
view-forward
# Docs
view-forward
# Events
view-forward
# GraphQL Tools
view-forward
# Jobs
view-forward
# Random
view-forward
# React Apollo
view-forward
# Showcase
view-forward
# Subscriptions
view-forward
# Testing
view-forward
# Vue Apollo
view-forward
Team

Apollo Hooks failing on first call and then returning previous response.

June 24, 2020 at 6:55pm

Apollo Hooks failing on first call and then returning previous response.

June 24, 2020 at 6:55pm (Edited 3 months ago)
Hi Y'all! I'm currently facing this odd bug with Apollo hooks that fails the first mutation call and then returns the previous response on subsequent calls. At first I thought perhaps it was loading, but checking that prop reveals it is false and not loading. Any ideas on a cause? Thanks!

June 24, 2020 at 7:12pm
That sounds like you're not using the hook correctly. See this post on reddit https://www.reddit.com/r/graphql/comments/h8sgo8/issue_with_usemutation_hook/
  • reply
  • like
90% of the time, you should be using the Promise returned by calling mutate, not the data returned by the hook.
  • reply
  • like