4,527 questions
0
votes
0
answers
56
views
React Native Release APK works locally but breaks on Play Store with "undefined is not a function" Apollo Client error
My React Native app (v0.79.5) with Apollo Client works perfectly when testing locally with release APK, but when uploaded to Google Play Console and downloaded from the Play Store, I get consistent ...
1
vote
0
answers
96
views
Package subpath './express4' is not defined by "exports" error when trying to run a nestjs graphql
I'm trying to run a graphql server in nestjs. I get this error when trying to run this project.
Package subpath './express4' is not defined by "exports" in /Users/shehanniwanthaka/WORK/RND/...
0
votes
3
answers
121
views
Nx Monorepo NestJS GraphQL application generating the latest schema
I have an nx monorepo with a NestJS GraphQL application and it doesn't seem to be generating the latest schema from my Resolver class. I have a @Query and a @Mutation but only the @Query is being ...
-1
votes
1
answer
84
views
How do I clear apollo errors that fill the console when running Cypress tests
Since sometime recently, possibly from upgrading to apollo 3.9.9 or from switching to mocking with graphql-codegen (not sure which if either), the console of my developer tools now fills up with ...
0
votes
1
answer
53
views
How to call hook after delete mutation?
In my react app, I would like to navigate to another page after I execute GQL delete mutation using Apollo. This mutation is called from inside a modal popup:
function DeckDeleteModal({showModal, ...
1
vote
1
answer
33
views
Fetch user only once when filling react global state
I am using the following code to manage logged in user fetched from apollo query in my React app.
import { useQuery } from '@apollo/client';
import { createContext, useEffect, useState } from 'react';
...
0
votes
0
answers
124
views
Why am I getting "ERR_CONNECTION_REFUSED" when querying by sidecar-hosted backend in Azure App Service?
------------Update------------
In the end I never solved this problem, and instead deployed the api as its own app service which solved the problem.
----------- Original Post -------------------
I'm ...
0
votes
0
answers
48
views
During the startup of a SpringBoot project, the value of the Apollo-injected variable is null
I encountered an issue where, when using Apollo to inject a static variable property, the variable is null during project startup. However, when the variable is modified via Apollo, its value is ...
0
votes
0
answers
32
views
Log usage of deprecated GQL fields in Kotlin / Spring Boot
We use Apollo inside our Spring Boot app and define our schema in schema.graphqls file. Sometimes, we mark some arguments / fields as deprecated. Is there some way how to detect that some client calls ...
0
votes
0
answers
43
views
useQuery with useEffect not causing infinite re-render
I have below code snippet:
const [state, setState] = useState(null);
{data, loading, error} = useQuery(SOME_QUERY, {fetchPolicy: 'no-cache'});
useEffect(() => {
setState(data)
}, [data]);
This ...
0
votes
0
answers
47
views
Type 'string' is not assignable to GraphQL type
I am writing a resolve for an object defined via Graphql. Despite the response returned from a query being correct, typescript keeps giving this error
Types of property 'code' are incompatible.
...
0
votes
0
answers
34
views
Are inline fragments recommended for GraphQL for native mobile app consumption?
New to GraphQL. Working on designing integration for native mobile app (kotlin/swift).
Planning to use Apollo GraphQL
Architecture:
native app(app) -> graphQL server (server) -> REST endpoint (...
1
vote
2
answers
247
views
getting cookies from apollo client on next js
I want to get the cookie with my client component, but somehow, it always return undefined or empty string. I am using js-cookie since someone recommend it.
ApolloProviderClient.tsx:
"use client&...
0
votes
1
answer
37
views
setContext not setting the token call before API call when token expires
Token API should get called before the GraphQL API but it's being called at the same time
I am fetching the headers inside setContext
Inside commonAuthHeaders I am calling the API to get refresh token
...
1
vote
0
answers
15
views
Cannot throw specific error to the frontend from backend in apollo/spring app
I want to throw a custom exception from the my reactive spring-boot backend to the browser front end over graphql apollo. I want to front end browser to know about the specific information in this ...
0
votes
0
answers
63
views
does Apollo Sandbox work completely without login?
I am trying to find if this is really the case OR login is required for a reduced set of use cases. The most notorious case is that of Operations Collections.
I couldn’t find out how to save ...
1
vote
0
answers
46
views
Unknown logs in registered persisted query
I am trying to implement registered persisted query. when i am running a query which is not there in my PQL, with apq as enabled it is logging the query in router logs with error code “...
0
votes
1
answer
58
views
Publishing Image in Hygraph CMS and Expo
Scratching my bald head here. I am building am app using Expo, react native and tsx.
I am using Hygraph as my CMS and Apollo Client. The below mutation works well and everything gets stored in the CMS ...
0
votes
1
answer
119
views
Fragments with Apollo kotlin Graphql not getting Fragment type in response using Moshi Converter
When using a Fragment in my query for Graphql call, I am facing below issue with Fragment during Moshi conversion.
I have query like this
fetchData($userId: String!)
{
...UserDataFields
}
fragment ...
0
votes
0
answers
26
views
Why is apollo not merging this response into the cache?
I have two queries which look like this:
const GetPayablesQuery = gql`
query GetPayableInvoicesQuery(
$paging: PagingGqlInputOfPayableInvoiceSortColumnGqlInput!
$teamId: HashId!
$filter: ...
0
votes
1
answer
86
views
Vue 3 apollo client UseLazyQuery for multiple results
I am trying to run the useLazyQuery in my vue to get data from Apollo client. I am passing the parameter and query return different results based on the parameter being passed.
My issue is that result ...
0
votes
1
answer
93
views
How can I aggregate fields using a custom directive in Federated GraphQL at the gateway layer?
I have cross-cutting concern across my graph, where I need to aggregate fields at my gateway layer, versus at my subgraphs. I must tag fields of interest in all of my subgraphs with a custom directive ...
0
votes
0
answers
18
views
Fetchmore doesn't get the next result with 'after' variable. Apollo Graphql
I'm pretty new to GraphQL and I enountered an issue. The issue is: I have a list of tags that are around 40. so when I try to fetch the data initially, it returns a 30 tags and an end cursor:
const ...
1
vote
2
answers
1k
views
Why does a new Angular 19 app error when executing ng add apollo-angular?
I'm trying to add apollo-angular to my Angular 19 project, but I'm getting the following output in the terminal:
We couldn't find 'esnext.asynciterable' in the list of library files
to be included in ...
2
votes
0
answers
203
views
Unable to compile Apollo in iOS with Xcode 16.1 - Missing run-bundled-codegen.sh
I’m working on an iOS project using Apollo with GraphQL in Xcode 16.1, and I’ve encountered an issue that prevents me from building my project correctly. When I try to build the app, I get the ...
0
votes
1
answer
165
views
Pagination of Data with Apollo GraphQL and SSR NextJS pages
I am using Next.js v14, graphql, ApolloClient and ApolloGraphQL Experimental support for NextJS
{
"@apollo/client": "^3.12.0-rc.3",
"@apollo/experimental-nextjs-app-...
0
votes
0
answers
34
views
Node/Apollo - A connection attempt failed because the connected party did not properly respond after a period of time
We have a Node + Apollo Server GraphQL API that calls multiple microservices. Under performance testing, we are suddenly hit with a lot of 500 responses with the message
A connection attempt failed ...
-1
votes
1
answer
97
views
Is Apollo Client Devtools compatible with new React Native DevTools?
With the launch of the 0.76 version of React Native there is a new devTools and I was wondering if the Apollo Client Devtools is compatible with it.
0
votes
0
answers
137
views
Apollo-ios query problem - .couldNotParseToJSON
I am trying to learn how to use Apollo-ios library to work with GraphQL API. I created an example trying to run a simple query on free API: https://countries.trevorblades.com. I followed all ...
3
votes
1
answer
1k
views
Why does querying Strapi with "DRAFT" status return both published and drafted items in GraphQL?
I'm using Strapi as a headless CMS with the Draft & Publish feature enabled, and I'm querying the data using GraphQL in my project. The problem I'm facing is with filtering drafted and published ...
1
vote
0
answers
206
views
502 Bad Gateway Error when Switching Pages in Next.js with Apollo Client Setup
I'm encountering a 502 Bad Gateway error when switching between pages in my Next.js application that uses Apollo Client. Here’s a brief overview of my setup:
import { ApolloClient, HttpLink, ...
0
votes
0
answers
171
views
Unable to Connect Apollo GraphQL Sandbox to My Local Graphql Server
I'm running a GraphQL server using Rails with the graphql-ruby and graphiql-rails gems. I can access the GraphiQL interface successfully. I've set up a POST route at /graphql that maps to graphql#...
-1
votes
1
answer
597
views
How to install apollo-ios-cli from the Swift Package using the command line?
I am using apollo-ios library via the Swift Package Manager, and I can install apollo-ios-cli from the Xcode menu. However, when building my app in a CI/CD environment, the tool cannot interact with ...
1
vote
0
answers
101
views
Apollo Upgrade to 4.0.0 cannot find schema.graphqls
I'm updating my app to use Apollo 4.0.0 (from 3.8.2). When building, I get this error:
No schema found. Apollo needs a .graphqls or a .json schema.
There is most definitely a file called schema....
0
votes
0
answers
259
views
apollo client failed to fetch but simple fetch from the same url works
i am trying to implement a graphql client / server in my private lan.
i am using apolloclient 3 and apollo server 3.
for some reason the client fails to query the server.
a simple fetch from the same ...
0
votes
1
answer
223
views
How to run a GQL Query against mock data to get realistic results in unit tests?
I’m looking for a way to run a query against a mock data object.
The problem
I currently mock the GQL response via . That works great, but the mock’s result comes back exactly as defined. The mock ...
0
votes
1
answer
37
views
Nuxt3: graphQLErrors in a composable
I'm using useAsyncQuery in a Nuxt3 App and want to access the graphQLErrors. It seems that important attributes like extensions and path are not part of the error object in a composable object.
const {...
0
votes
1
answer
49
views
Android apollo3 schema not found
I'm trying to use local schema from this url:
https://spacex-production.up.railway.app/
In my data module I have
apollo {
service("RocketsGraphQL") {
packageName.set("com....
0
votes
0
answers
280
views
NestJS GraphQL Federation 2, problem with @ResolveReference between two services
I need help.
I currently have nestjs graphql microservices (apollo) federated via a nestjs gateway (appollo gateway).
The types are shared between the services via a library that shares the types (I'm ...
0
votes
1
answer
128
views
Datasource is undefined when running the Apollo GraphQL server
I am getting datasource undefined on resolvers when trying to query getTracking.
I have a FedexAPI class that extends RESTDataSource from "@apollo/datasource-rest" as a Data source.
The ...
0
votes
1
answer
209
views
How to Query Multiple Media Items by MyAnimeList IDs Using Anilist's GraphQL API?
I’m working with a Anilist's GraphQL API where the Media query supports fetching media by a single ID. The schema for the Media query looks like this:
query Media($idMal: Int!) {
Media(idMal: $idMal)...
0
votes
1
answer
145
views
Can we use apollo client without npm (on shopify theme basically)
I am trying to implement apollo client in our shopify theme using vanilla js. almost all the documentation and guides use npm to install the apollo client package. while on shopify we don't use npm ...
1
vote
1
answer
201
views
How to cache GraphQL response in Apollo Client?
I have a React app where I am using Apollo client to handle GraphQL queries and caching.
I have two GraphQL queries, one that fetches a whole menu and another that fetches top level menu sections.
I ...
1
vote
1
answer
175
views
Best practise to typePolicies with Apollo
I want to have centralized client-only fields.
Example:
Server:
type Name {
first: String
last: String
}
type User {
name: Name
}
Client:
extend type User {
fullName: String!
}
import { ...
2
votes
1
answer
163
views
GraphQL Apollo Client refusing to not use cache in Next.js
Apollo Client is refusing in any circumstances to update cached data with the ones from the server. We are running Apollo Client in Next.js (14.2.5) SSR using the getClient() method below:
import { ...
0
votes
1
answer
312
views
Apollo Client is not using cached data and instead makes a network request
I have this weird behavior that I've been wrapping my head around for the past couple of hours.
Let's consider these two queries as examples:
A query that returns and array of authors
query Authors {
...
1
vote
0
answers
241
views
Apollo client completely disable caching, or fix caching issue
So we have this problem with Apollo client. Our stack if following: PayloadCMS graphQL API and Next.js 14 with Apollo client.
The problem is following when data are changed on the PayloadCMS, the Next ...
0
votes
1
answer
60
views
Two NextJS applications in separate repositories under one backend
I have two NextJS applications under separate repositories and different domains.
I want the second NextJS application to fetch the first NextJS application's backend code. Backend is graphql + apollo....
0
votes
1
answer
79
views
Struggling with mapping a nested Apollo query result to another value
I have a use case in Angular Apollo that looks something like:
eval(someId: number): Observable<string | Error> {
return this.apollo.query<FirstQuery>({
query: FirstDocument,
...
0
votes
2
answers
65
views
Server-to-Server Apollo Queries & Mutations with Apollo 4
I'm having a hard time making Apollo mutations from server to server.
I've spent quite a while today looking around for examples or suggestions on best practice for passing data between two API's that ...