apollo-client Questions
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
9
Although I copied and pasted the graphQL query from the GraphiQL tool after I tested it at GraphiQL successfully , the query returned with an error when I tried it in Apollo client within a reactJS...
Allegraallegretto asked 20/5, 2018 at 11:45
2
Solved
I was installing the @apollo/client library in my vite project and when i called
new InMemoryCache() from the apollo library i got console error Uncaught SyntaxError: Unexpected string
And if i cli...
Wingo asked 21/6, 2023 at 21:56
3
Solved
I'm attempting to create an apollo client plugin for a Nuxt 3 application. It's currently throwing an error regarding a package called ts-invariant:
file:///Users/[my name]/Repositories/[project]/n...
Joell asked 7/1, 2022 at 1:34
5
Solved
I need to call a query when submit button is pressed and then handle the response.
I need something like this:
const [checkEmail] = useLazyQuery(CHECK_EMAIL)
const handleSubmit = async () => {...
Alcina asked 31/5, 2020 at 21:11
3
Solved
I am trying to make a mutation call to my graphQL server from a react application. The react code looks like the following:
client.query({
query: gql`
mutation{
addTeam(input:{name:"Somenam...
Frivolity asked 16/3, 2019 at 22:6
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
0
I'm new to vue-apollo 4 and I just can't get it to work with my simple Graphql API
I already:
- allowed edge://flags/#allow-insecure-localhost (enabled)
- created and added to trusted authories c...
Inconsonant asked 30/3, 2023 at 4:13
2
Use this function to flatten the response returned from strapi on version 4. Helps you get rid of data and attributes properties
This will give you the same response structure as version 3 of strap...
Celebrant asked 10/2, 2022 at 10:35
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...
Ferrate asked 20/5, 2020 at 12:7
1
Context
I'm using Next.js 13. And I'm using apollo client to store some client side variables.
What i'm trying to do
I'm trying to execute the onClick function prior to navigating to the href locat...
Suppress asked 7/3, 2023 at 2:12
4
Solved
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
import React from 'react';
import {...
Hispanicize asked 2/5, 2022 at 7:18
4
Solved
How to use UseQuery in React.UseEffect? this is my simple query
const {allrecord} = useQuery(ME, {
onCompleted: ({ meTeacher}) => {
setUser(meIAM);
getRecords({
variables: {
orgId: meIAM.o...
Sundried asked 10/12, 2021 at 7:8
3
Solved
I am looking for a way to make the developer workflow more efficient while GraphQL.
Currently, using graphql-code-generator to generate types from my GraphQL server on the frontend.
This is great, ...
Inhumation asked 16/8, 2020 at 11:25
1
I'm trying to set timeout with prisma-labs/graphql-request. I've tried the way described here - https://github.com/prisma-labs/graphql-request/issues/103.
const client = new GraphQLClient(config.u...
Inverson asked 14/11, 2019 at 20:28
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
2
Solved
I noticed that when I unsubscribe from query, http request is still executing and not being canceled. Also tried to use AbortController but without any luck. How does one cancel http requests made ...
Roid asked 13/5, 2019 at 19:24
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...
Wreath asked 25/6, 2018 at 20:37
2
I am using nextJS and apollo client, and I am creating a mutation which needs to send image and a file.
But when I try to make a request the error shows up. This operation has been blocked as a pot...
Intrusive asked 26/11, 2022 at 9:33
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
5
Solved
I am using react-native and apollo client and if I try to set header by jwt stored in AsyncStorage, it seems not working.
Other resolvers which doesn't need header works very well. My code is like...
Doleful asked 1/9, 2019 at 15:19
1
Solved
To navigate around in my react-native app, I am using "react-navigation".
With the code below, I can successfully intercept all necessary errors that are coming from the server.
const linkError =...
Bludgeon asked 8/9, 2018 at 6:16
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
2
I want to use the library https://github.com/apollographql/graphql-tag
I'm looking for someone smarter than me that understands how to actually use it.
Say I have a GraphQL query document like so:
...
Rolland asked 5/3, 2022 at 11:54
© 2022 - 2024 — McMap. All rights reserved.