apollo-client Questions

0

I am trying to test my React & graphql code. when trying to mock the ApolloProvider with the MockedProvider from @apollo/react-testing (as written in the documentation of Apollo), i am getting...
Stere asked 11/3, 2020 at 15:34

1

Solved

I have a mutation (UploadTransaction) returning certain list of certain object named Transaction. #import "TransactionFields.gql" mutation UploadTransaction($files: [Upload!]!) { uploadFile(fil...
Basidium asked 23/2, 2020 at 8:4

1

Edit: is this not working because I'm not calling getInitialProps? NextJS documentation (https://nextjs.org/docs/basic-features/data-fetching#server-side-rendering) says that if you don't then the ...
Easterling asked 21/2, 2020 at 14:56

1

Solved

I'm making a simple test with @apollo/react-hooks, and I'm getting this error: ApolloError.ts:46 Uncaught (in promise) Error: Network error: Unexpected end of JSON input at new ApolloError (Apoll...
Tetramethyldiarsine asked 13/2, 2020 at 15:51

1

Solved

As per instructions followed here, I'm trying to cache my endpoint URL and token from Auth0 before constructing my Apollo client: import React from 'react'; import { ApolloClient, ApolloProvi...

1

Solved

For the following code: const apolloClient = new ApolloClient({ cache: new InMemoryCache(), link: new HttpLink({ uri: endpoint, headers: { 'Content-Type': 'application/json', Authorization: ...
Sender asked 5/2, 2020 at 16:9

1

Solved

I am new to React Native and Apollo-Client. In my Screen there are three tabs and individual tabs is calling its own data. But due to useQuery UI is completely freezing and giving a very bad experi...
Emelina asked 21/1, 2020 at 13:25

2

Solved

I am trying to use the GraphQl with React. It is suggested to use the Apollo client for React to implement GraphQL in the application. But I don't want to use it in the first place. Can I use Graph...
Guadalupe asked 6/1, 2020 at 18:39

5

Solved

I am using React Router 4 for routing and Apollo Client for data fetching & caching. I need to implement a PrivateRoute and redirection solution based on the following criteria: The pages a u...
Godroon asked 8/2, 2018 at 18:42

7

I am trying to get a basic Rails, Graphql, Apollo-Client setup working but having trouble with 422 errors 'invalid auth token' on the rails side. Does my use of apollo look wrong? It is a Rails ...
Alagez asked 10/3, 2017 at 17:8

1

So I need a pair of fresh eyes to help me out! I just started using the new hooks for apollo and they are pretty cool! However, I am running into an issue when I try to pass variables, it returns u...
Marji asked 20/10, 2019 at 21:33

1

I have a React app using react-apollo:2.5.8 and a library of custom components that I install via NPM and use within the app. The library has react-apollo:2.5.8 listed in peer and dev dependencies....
Destruction asked 26/11, 2019 at 2:53

2

I am using the latest version of Apollo Client in a simple React app and I am trying to pull out a header value from the response that is being used to show the size of the record set being returne...
Barbed asked 22/11, 2017 at 21:4

2

Solved

I'm using Apollo Client, and for fetching queries I'm using useQuery from the package @apollo/react-hooks. I would like to accomplish the following: List of Steps: Step 1: Fetch a query stage const...

1

I'm facing a very weird issue here. We have a graphql search query, that takes in filters and gives us a list of items. The query is something like this allOpportunityV2(only: String, page: Int, ...
Dorman asked 25/3, 2019 at 12:19

1

Solved

I'm beginning our migration from Apollo Client 2.x to 3.x beta, and I'm having trouble using both the apollo hooks and the now deprecated query/mutation components. I'm using the packages: @apoll...
Criticize asked 8/11, 2019 at 18:17

0

In my query, I use a blend of remote and local properties. The local properties have different values depending on: The remote properties The current unix timestamp The local resolvers computes...
Leukemia asked 2/11, 2019 at 18:26

1

Solved

I have a component that passes a string (userToFetch) it as a variable parameter in a parameterized query. The component looks like this: // pages/index.jsx import React from 'react'; import { us...
Flexor asked 11/10, 2019 at 4:28

1

Solved

I am authenticating requests to my server via Apollo Client using a token and have copied the following example provided in the docs: const httpLink = createHttpLink({ uri: 'http://0.0.0.0:3003' }...
Softspoken asked 21/3, 2019 at 19:22

1

td;dr How do I include vue-apollo in a project that already uses TypeScript? I created a fresh vue project using vue cli@3 and using TS. Then I added the vue-apollo plugin which modified my main...
Herniotomy asked 16/11, 2018 at 5:29

1

Solved

I am trying to show preloader when a networkStatus is in-flight. I know that every query returns its own networkStatus, but in my application there are so many different queries. I want to have a ...
Butts asked 20/9, 2019 at 12:51

1

Solved

I know this has been asked a couple of times before, but I have found no definitive solution to whether this is possible with GraphQL. And I have a strong feeling this should be possible as it shou...
Derogate asked 16/9, 2019 at 19:0

0

A strange scenario with GraphQL. Let's say there is a Subscription called postIsRead, which signifies a post in a list of posts as currently being read, such as: Post: { id: 1, read: true } Onl...

2

Solved

We are currently moving from Relay to React Apollo 2.1 and something I'm doing seems fishy. Context: Some components must only be rendered if the user is authenticated (via an API key), so there i...
Gamo asked 23/3, 2018 at 19:3

1

I'm trying to disable cache on Apollo, therefore I'm following the documentation apollo-client , but I cannot success, I get all the time this warning ApolloBoost was initialized with unsupported o...
Kado asked 26/11, 2018 at 9:30

© 2022 - 2024 — McMap. All rights reserved.