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
Posts
Members
Info

React re-render causing Apollo useQuery to be called twice

I have a simple React component that uses Apollo's useQuery to fetch data. The problem is, because the component is being re-rendered by Apollo, it is calling useQuery twice, which is then calling the Apollo resolver twice, which is then calling the associated function that…

thumbsup
0
message-simple
3

does readquery brings in new cache?

I have this code update(cache, { data }) { const newLectureFromResponse = data?.insert_lectures_one; …

thumbsup
0
message-simple
0

While testing Apollo with jest:

I am getting : TypeError: Cannot read property 'query' of undefined------------ const folderMocks = [ …

thumbsup
0
message-simple
0

Problem updating reac-apollo dependecies to apollo 3

In my project which uses Apollo 2, I import react-apollo dependencies like this: import { Query, QueryProps, QueryResult } from "react-apollo" Now In Apollo 3, I can't found QueryProps in @apollo/client, I have seen in the documentation of apollo with typescript, that QueryProps…

thumbsup
0
message-simple
0

Newbie looking for advise on how to create an Apollo GraphQL API

Hi everyone, I have just joined a new company and I am given a task as an assessment to use GraphQL along with React and till now I have only used REST I have no clue how GraphQL works and the books and tutorials I find seem to be so confusing since I am used to the REST way of…

thumbsup
0
message-simple
5

optimisticResponse in useMutation

Has anyone else found that adding optimisticResponse to useMutation causes all queries with 'network-only' to be refetched? If I remove optimisticResponse, it doesn't happen.

thumbsup
0
message-simple
1

useReactiveVar in sub components

How to deal with useReactiveVar and "Cannot update a component from inside the function body of a different component"

thumbsup
0
message-simple
1
Deleted·31d# React Apollo

How should i use the Apollo client in my react project

Hey everyone. I use redux-toolkit for state management in my react project. I want to use the apollo client to make graphql requests, but i do not fully understand how to work together. or I might be thinking wrong. can they work together? how should i send my api requests in my…

thumbsup
0
message-simple
1

React class component with reactive variables?

How can I use a reactive variable that triggers a re-render in a react class component?

thumbsup
0
message-simple
2

useLazyQuery Executed Twice

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…

thumbsup
0
message-simple
0