4,520 questions
0
votes
0
answers
63
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
162
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
134
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
132
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
34
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
139
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
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 ...
1
vote
2
answers
271
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
39
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
16
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 ...
1
vote
0
answers
55
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
61
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
139
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
29
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
97
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
103
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 ...
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
222
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
185
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
38
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
112
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
139
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
223
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
188
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
662
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
109
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
272
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
263
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
39
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
52
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
297
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
142
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
266
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
150
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
221
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
230
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
186
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
357
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
271
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
62
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
81
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
86
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 ...
1
vote
1
answer
315
views
Apollo Router Coprocessor issue: context propagation impossible for Java POJO
I am currently writing a Java coprocessor for the enterprise version of Apollo Router. I need it to propagate values from the RouterRequest stage, all the way to the RouterResponse stage.
I had ...
1
vote
1
answer
91
views
Error in Angular components shows loading and not loading using if-else
im learning angular 18 SSR. I have a render problem when i load data from a graphql service; the load elements (skeletons) are showed using the value loading from a signal converted from a service ...
0
votes
0
answers
150
views
How to infer parameter types for a wrapping function in Typescript
I need to wrap functions and pass in the wrapped-functions' arguments as parameters in the wrapping-functions. Rather than create interfaces for arguments for each instance of wrapped functions, I was ...
0
votes
0
answers
143
views
Apparent cors error in apollo-angular and .NET with Azure function
I'm developing my first Angular v18 client app consuming an Azure function app with GraphQL (hotchocolate).
I have a problem with apollo apparently, when I try to consume the service, in the console....
0
votes
0
answers
119
views
How do build a top component wrapper in next.js?
So I'm getting this error: Invariant Violation: Could not find "client" in the context or passed in as an option
And the reason is because my component is not wrapped in ApolloProvider
So ...
1
vote
0
answers
120
views
Calling a subgraph from a supergraph and passing in the Upload scalar type causes me grief
TL;DR
When calling the supergraph to upload files where the type is defined as Upload in the schema, the subsequent call to the subgraph passing in the Upload type fails with: "message": &...