Category "apollo-client"

How to trigger graphql useQuery on demand only once?

With the help of graphql-codegenerator we created a graphql useQuery that correctly retrieves data from the backend. When a string is entered into an input fiel

How to refresh JWT token using Apollo and GraphQL

So we're creating a React-Native app using Apollo and GraphQL. I'm using JWT based authentication(when user logs in both an activeToken and refreshToken is crea

How can I call apollo client conditionally in my vue template script?

I pass a query to apollo client in my script tag, in my template file but I don't want to do it every time. Rather, I'd like to pass a boolean in a prop and the

Type {} is missing the following properties from type {}: length, pop, push, concat, and 29 more

const function= () => { facets = useSearchMoreFacets( variables ); }; type UseSearchMoreFacets = { facets: MappedFacet[] | undefined; };

How to call a GraphQL query/mutation from an Express server backend?

My frontend is localhost:3000, and my GraphQL server is localhost:3333. I've used react-apollo to query/mutate in JSX land, but haven't made a query/mutation f

Apollo Client empty context (sometimes?)

So I've run into this weird issue i cannot resolve. My client code was working fine until today. Without any updates to the packages or to the code related to a

Add apollo client dev tools to chrome developer tools

I have downloaded the chrome extension Apollo Client Devtools. However it is not visible when devtools are open. Is there a way of adding this or is it a bug?

CORS Error with dgraph and apollo graphql

I am unable to run query requests with my local dGraph server. I am running dGraph using docker compose with both zero and alpha React client side frontend usin

@apollo/client TypeError: link.request is not a function

I've got this react component throwing at me this error: Uncaught TypeError: link.request is not a function at ApolloLink.execute (ApolloLink.js:65) at

Offload query parts in Apollo client

I vaguely remember Apollo supporting a directive / mechanism, which enables offloading parts of the query into a subsequent query. I know this can be achieved c

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 `useMutation()` stuck loading inside Next.js component

The following form component in Next.js submits without errors but never completes the mutation. Instead it get's stuck in the loading state. import React, { us

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