Category "react-apollo"

Apollo Client fetchMore get previous page for cursor based pagination

I know for a fact that to get the next page via cursor based pagination you need to example if query is product: products(first:12, after: endCursor,) Get the

GraphQL: TypeError: Cannot read property of undefined

I have an Apollo GraphQL projects where I have created my own Query and Mutations. I have done using mock data and Query and Mutation works fine. But when I am

What causes TypeError in Apollo Client?

I am looking at an error report from Apollo Client. I am not able to reproduce the issue and it doesn't appear to happen often, but I would like to figure out w

Single React JS project with multiple graphql URI Link

Hello I am new to ApolloClient and I don't know to pass multiple URI links as a clint and I have to use those all URI if anyone knows about it give me suggestio

Configuring CSRF tokens with apollo client and graphene-django

I am having trouble properly setting up csrf tokens in the authlink header. const authLink = setContext((_, { headers }) => { const token = localStorage.

Apollo Client: valid object type not being recognized

Here's my schema file: import { gql } from 'apollo-server'; const typeDefs = gql` type Price { currency: Currency!, amount: Float! }

Features work, but console delivers extraneous error: "Variable "$id" of required type "ID!" was not provided."

My CRUD operations work. But many of them also generate a single, specific console error I haven't been able to track down. [GraphQL error]: Message: Variable

How to prevent re-rendering with useSubscription()?

Many of you might have heard of GraphQL. It provides QUERY and MUTATION. Also it supports SUBSCRIPTION as 100% replacement of web socket. I'm a big fan of Graph

how to get data from graphql server using react and react-apollo?

After about 6-8 hours trying, I'm resorting to help. All I want is to query my graphql server and the response data to be entered into my react component as pro

How to call useQuery hook conditionally?

Because of the Rules of Hooks, one shouldn't call hooks conditionally. So how does one fetch data conditionally using useQuery? For example, let's say I want to

React Apollo Link - How to forward operation after a promise has resolved?

So I figured out how to setup a middleware to handle my auth tokens, as well as getting new ones, if need be. The problem is that, there is an edge case here wh

Cannot read properties of undefined (reading 'bind') useQuery

I have this code right here import React from "react"; import { useQuery } from "@apollo/react-hooks"; import gql from "graphql-tag"; const FETCH_POSTS_QUERY

Apollo Client state management

I have a situation where I need to save user input on multiple UI pages and then send accumulated data to some 3rd party backend service. I wanted to understand