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

useLazyQuery Executed Twice

March 3, 2021 at 9:19am
The Apollo community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

useLazyQuery Executed Twice

March 3, 2021 at 9:19am
I am working on one React project, and for one of the components I am calling useLazyQuery in useEffect hook with an empty dependencies array. When the query gets executed i am returning the child component and inside the child component i have one useMutation hook which i am calling on one of the child events. The problem is when a child component calls that useMutation hook/API somehow it also calls that useLazyQuery from the parent. Although i have put that in useEffect with empty dependency. so my question is why it's calling that parent uselazyQuery having empty dependency.
No messages yet