Category "apollo-client"

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

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

Apollo dev tools not showing any data

The dev tools version is 4, same situation in Chrome as in Firefox. "@apollo/client": "^3.5.7", const createApolloClient = (authToken) => { return new Apol

How can i assign token in async storage to headers in app.js after login. in react-native

I am getting access token after login and I want to assign that token to authorization in headers in my App.js I am using async storage to store the access toke

How to get uri from apollo client object

Context: I'm working with micro front-end, and I want to access the uri of the apollo client. I'm currently passing the whole client object and I don't want to

(Apollo client v3) useLazyQuery custom hook testing

I was struggling with a test issue for my custom useLazyQuery hook. My first test is passing but the second one is failing. What am doing wrong for the second t

How to generate the Apollo sha256 hash?

I need to generate the sha256 string from a graphql query - without Apollo. Assuming my query looks something like: query Foo { bar { test } bar2 } H

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

How to pass multiple headers in Apollo GraphQI?

I wanted to know how to pass multiple headers in Apollo GraphQl as i know how to pass single but not multiple headers.Any solutions or suggestions appreciated.T

React router - useOutletContext testing

I'm using react-router V6 and trying to test the new feature of useOutletContext. my testing library is testing-library/react and I'm not sure how to pass the C

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! }

Apollo reactive variables - how to mock value of the variables into a component during testing

I need some help. I'm a newbie in apollo client reactive variables. There is a component where the displaying of the message depends on a variable that values f

Error: ENOENT: no such file or directory, open

I am learning apollo. When I run my code it showing this error on my browser I don't know if it is my browser's problem. can anyone help me fix this Error messa

'loading' remains true when loading data with 'useQuery' using 'apolloClient' in react-native

I'm trying to fetch data using Apollo Client useQuery in React Native, but loading hangs at true state and fails to fetch data. below is the actual code. App.js

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