react-apollo Questions

2

Intended outcome: We did a pagination implementation, following the apollo docs (https://www.apollographql.com/docs/react/pagination/offset-based/). Using a read/merge function We expect that the r...
Kleon asked 16/4, 2021 at 14:2

5

Solved

This must be user error, but I've got an app with a simple currentUser query that looks at a JWT for an id, looks it up, and returns the appropriate user. I can look at devtools and see that it's i...
Xanthic asked 18/3, 2021 at 17:20

3

Solved

Heres a model situation I have some fields in my DB lets say color,size,height ... I can fetch and display these fields to user who can choose these fields and they are afterwards set to component...
Orthogonal asked 15/6, 2018 at 9:18

2

Solved

I'm having some trouble figuring out token refreshes when using apollo-client and firebase's auth service. I've setup token refresh using apollo client before. Typically I use the apollo-link-erro...

2

To implement pagination with Apollo, you're typically going to use the fetchMore function, given to you when you send a query, in combination with updateQuery to tell Apollo how to update its cach...
Bumpy asked 1/5, 2019 at 22:43

5

Solved

Apollo link offers an error handler onError Issue: Currently, we wish to refresh oauth tokens when they expires during an apollo call and we are unable to execute an async fetch request inside the...
Clerical asked 21/6, 2018 at 9:41

3

I am trying to mutate a mutation. The mutation does exist and works fine on my graphql playground. but as I implement it in my react component, I get error. Queries work fine though. By the way, I ...
Bersagliere asked 1/5, 2019 at 8:46

2

I want to implement a way to switch over different links based on the context set in graphql query. What I did so far is something like this which is working fine but doesn't seem to be a nice solu...
Dalrymple asked 11/2, 2021 at 12:49

3

Solved

I've got a type called Article in my schema: type Article { id: ID! updated: DateTime headline: String subline: String } For updates to it, there's a corresponding input type that is used by a...
Dextrosinistral asked 6/3, 2017 at 17:10

7

I have a React application with ApolloClient with Apollo-Link-Schema. The application works fine locally but in our staging environment (using GOCD), we get the following error: Uncaught Error: Ca...
Villeneuve asked 10/12, 2019 at 17:46

2

Solved

I got the above error on a graphql query, I am using apollo-react by the way and using the Query component for rendering the data this is my code const GET_VEHICLE_CHECKS = gql` query getVehicleChe...
Ultravirus asked 2/7, 2019 at 8:4

6

In my next.js app I am trying to configure the Apollo Endpoint: import { ApolloServer, gql } from "apollo-server-micro"; // This data will be returned by our test endpoint. Not sure if I...
Ingar asked 11/8, 2021 at 15:51

4

I have tried following the instructions on Apollo Client for sending cookies along with the graphql request, but the express server is not receiving any cookies and when I inspect the request it sh...
Santanasantayana asked 3/11, 2017 at 21:4

4

I'm a bit confused on how to structure my React/GraphQL (Apollo) app when no connection should be made until the user authenticates/logs in. Currently I have this: class App extends Component { ...
Kreis asked 12/6, 2017 at 22:49

4

Solved

I'm using apollo-client, apollo-link and react-apollo, I want to fully disable cache, but don't know how to do it. I read the source of apollo-cache-inmemory, it has a config argument in its const...
Buxom asked 19/12, 2017 at 2:0

2

Solved

I am using nextJS, I want my front end react queries with apollo to be typed out, but no configuration is working. I get an unknown error on my query when I use import {gql} from src/__generated__/...
Dowling asked 3/12, 2022 at 18:22

1

I get this randomly in my Apollo Client code. I'm using the anti-pattern of surrounding all setState with an isMounted flag to prevent attempts to set the state when a component is unmounted or a u...
Checkrein asked 27/12, 2019 at 7:42

2

The issue: Hello, so I've been using apollo-client for a while on my ReactJS application. I've just noticed that sometimes when I use the useQuery hook, the execution completely ignores the skip a...

6

I am using apollo graphql in my react application. Say I have the following query: query ListQuery($filter: String!) { items(filter: $filter) { id name } } This query lets me query a list of...
Shekinah asked 19/5, 2017 at 22:0

4

Solved

I am working on a react app with react-apollo calling data through graphql when I check in browser network tab response it shows all elements of the array different but what I get or console.log() ...
Maturate asked 17/2, 2018 at 10:14

3

Solved

I have been trying to get my head around this problem but haven't found a strong answer to it. I am trying to execute a login mutation using the useMutation hook. TLDR; I want to know what exactly ...
Superfluity asked 24/12, 2019 at 8:19

1

I have a react app that use apollo as a grapql client. The app now need offline support for a subset/subapp. There is a service worker (thanks to workbox and webpack) that do the pre-caching of the...

5

Solved

I'm using React hooks both to fetch GraphQL data with react-apollo and to store local state: const [userData, setUserData] = useState({}) const { loading, error, data } = useQuery(USER_QUERY) Ho...
Luciolucita asked 20/8, 2019 at 15:35

0

I've been using @skip and @include directives in a couple of my queries and while they work quite good for 'simply' customisable queries I'm looking for a solution supporting a highly customisable ...
Chaldea asked 27/12, 2022 at 20:31

3

I have searched all over StackOverflow and saw similar questions but have not found a working solution. Wondering if anyone has a working solution? I am developing a create react app on localhost:3...
Hideout asked 10/9, 2019 at 22:37

© 2022 - 2025 — McMap. All rights reserved.