apollo-client Questions
1
I have mixed application that uses Apollo for both React and non-react code.
However, I can’t find documentation or code examples around testing non-react code with the apollo client,not using Mock...
Emblazonry asked 28/10, 2021 at 15:0
2
Solved
I'm trying to get a list of countries from a graphql server in my react app. The getAllCountry query works fine on playground but whenever I call the same query on the app, I get the following erro...
Donnydonnybrook asked 11/2, 2021 at 0:15
1
followed the steps in https://github.com/quasarframework/app-extension-apollo/tree/v2 to install Apollo extension to Quasar 2.4.9:
"devDependencies": {
"@babel/eslint-parser":...
Cordi asked 15/1, 2022 at 12:0
0
Official Apollo and NextJS recommendations are about to create a new ApolloClient instance each time when the GraphQL request should be executed in case if SSR is used.
This shows good results by m...
Doralynne asked 7/1, 2022 at 15:1
4
Solved
I am attempting to use the Apollo GraphQL Client for React Native. However, in some parts of my app I need to do a mutation on the GraphQL data, in such a way that the interface should not be expos...
Natch asked 27/8, 2019 at 1:7
4
Solved
I have a mutation called like this (this isn't the actual mutation call, but a minimal example):
const App = () => {
const [myMutation] = useMutation(gql`
mutation Test($updateUserId: ID!, $up...
Fattish asked 5/9, 2021 at 0:24
3
Solved
I have a page written in tsx that keeps crashing on load with the error client.watchQuery cannot be called with fetchPolicy set to "standby", even though the query in question is useLazyQ...
Centipoise asked 23/11, 2021 at 23:56
5
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 created), and want to implement a flow wh...
Cailly asked 20/4, 2020 at 16:32
0
Having some issues importing CJS modules with Jest (ESM, and ts-jest). Minimal reproduction repo.
For example, importing from the @apollo/client module as described in their docs:
import {
ApolloC...
Subfusc asked 4/12, 2021 at 17:42
4
Solved
I am unable to get the data by using the useQuery in the below mentioned way
const { data:data1 } = useQuery(Get_Doctor);
const { loading, error,data } = useQuery(GET_Branch);
Reword asked 20/8, 2019 at 7:20
2
I want to make a subscription to a GraphQL server. The application is running in a NodeJS script (i.e. not in the webbrowser).
Here is what I currently do:
const fetch = require("node-fetch").def...
Cotter asked 11/3, 2020 at 16:18
3
I am doing a demo project on graphql queries. Followed all the required steps and downloaded schema.json from my dummy graphql server on graphcool. However when I am writing the .graphql file which...
Conradconrade asked 21/8, 2019 at 9:21
3
I've been having issues getting started with React, Apollo, and AWS-AppSync. I can't resolve this error message:
TypeError: this.currentObservable.query.getCurrentResult is not a function
I'm us...
Zwart asked 22/3, 2020 at 20:4
1
I have an application that updates the users token when it's expired. I need to update the client with this token to prevent error. I'm having trouble actually getting the new token to the front en...
Proliferate asked 26/11, 2018 at 4:8
3
I have a custom debounce hook for apollo lazy queries:
import {useLazyQuery} from '@apollo/react-hooks';
import debounce from "lodash/debounce";
export function useDebouncedQuery(schema) {
const...
Anglicism asked 9/8, 2019 at 16:55
2
Solved
I'm making unit tests for React components using apollo hooks (useQuery, useMutation), and in the tests I mock the actual queries with apollo's MockedProvider. The problem is that sometimes, my moc...
Caddy asked 6/2, 2020 at 17:0
5
I'm trying to set up a simple Android app that connects to a GraphQL server set on my local host via a Springboot application using Java GraphQL. Using GraphiQL I can queries just fine. The issue i...
Patriarchate asked 1/8, 2019 at 21:31
3
we are using Apollo/Graphql in our application, and we are facing an issue.
The application is developed in Angular 5, and NodeJS as backend with graphql server that will respond to the front end....
Cottonmouth asked 23/5, 2018 at 6:26
1
Solved
I have implemented relayStylePagination() according to the apollo docs(https://www.apollographql.com/docs/react/pagination/cursor-based/#relay-style-cursor-pagination) in the following way:
index.j...
Hainan asked 12/8, 2021 at 13:58
1
Solved
I'm running into the following error while trying to define refetchQueries in my useMutation hook.
Type 'DocumentNode' is not assignable to type 'string | PureQueryOptions'.
Property 'query' is mi...
Greg asked 31/7, 2021 at 10:48
3
Solved
In Apollo Client v3 React implementation, I am using hooks to use subscription. When I receive data from subscription I would like to refetch query but only if query has been previously executed an...
Bushore asked 29/6, 2020 at 6:24
1
Solved
So, i got an apollo server running and an apollo-client in my iOS app.
I'm trying to implement an authentication process. And following apollo's documentation about authorization and authentication...
Lanfranc asked 14/7, 2021 at 12:20
3
Solved
I'm trying to create ApolloClient using TypeScript, but there are some type-errors that I can't resolve. Can anyone point me to right direction what to do?
Below are the sample code (which is worki...
Menis asked 9/7, 2020 at 11:43
2
I wrote a hook that calls apollo useQuery. It's pretty simple:
useDecider:
import { useState } from 'react';
import { useQuery, gql } from '@apollo/client';
export const GET_DECIDER = gql`
query ...
Wozniak asked 3/11, 2020 at 19:52
4
Solved
This is how I define the apollo client with an upload link in my react native application.
I would like to add some header with a token value, which gets send with every request. But unfortunately...
Julesjuley asked 3/5, 2018 at 18:50
© 2022 - 2024 — McMap. All rights reserved.