Category "apollo-client"

Ensure that there is only one instance of "graphql" in the node_modules directory

While trying to download the schema using npm run schema:download I am receiving the following error. [email protected] schema:download npx apollo service:download

Could not identify object - getting error in graphql apollo client

I'm new to graphql I'm building real time chat app. Currently I'm making it offline first. Using react as front-end. I'm currently caching the data on localStor

How to use Apollo/Graphql hooks within external React.js component library

I have 3 React.js projects and I'm trying to consolidate the reused components across all 3 projects into one shared component library. This component library i

User defined fields in graphQL

Making an employee management system with graphene-Django and I have a JsonB field that I don't know the shape of because each company will defined the shape. H

Inconsistent results between Graphql playground and Apollo Client

I've run into an issue where Apollo client and the GQL playground return different data with the exact same query. The schema looks something like this: interfa

Testing function that use useQuery @apollo/client with Jest

I am trying to unit test my function that call useQuery from @apollo/client. Here's what I have done getPixelID.ts import { useQuery } from '@apollo/client'; im

What Causes 400 Bad Request In Django Graphene and NextJs Using The useMutation Hook?

I am trying to build a simple todo app using Django, Graphene and NextJs. I was able to create todos in graphiQL and postman, however when I try to create a tod

Apollo Client useMutation data always returns undefined

I have the following code that runs a mutation to update a post to "published" the mutation works great! It updates the data as expected. However, the data prop

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