Questions tagged [apollo-link]
34 questions
1
vote
0 answers
Specific mutations client separations
I know it is possible to use apollo-link-ws to handle subscriptions in client side. Also i created a client which uses standard http for running Queris and Mutations, and uses WebSocket for subscriptions. But i need to Pub ( emit ) some data to…

chapi
- 11
- 1
1
vote
0 answers
Apollo Server running as a gateway is hiding remote error if data is not null
I'm running an apollo-server-express as a gateway application. Setting up a few underlying GraphQL Applications with makeRemoteExecutableSchema and an apollo-link-http.
Usually every call just works. If an error is part of the response and data is…

DeltaM
- 11
- 1
1
vote
1 answer
relay subscription onNext not triggered on react-native
I am a subscription setup but onNext is not getting triggered I am not sure why since this is my first time implementing subscription and docs was not much help with the issue.
Here are the code implementations:
import {
graphql,
…

ydvsailendar
- 15
- 10
1
vote
1 answer
apollo-client - can I adjust apolloLinks dynamically after apollo-client instantiation?
How can I update the token during runtime in an instantiated apollo-client instance?
const middleware = new ApolloLink((operation, forward) => {
operation.setContext({
headers: new HttpHeaders().set('Authorization', 'Bearer ' + token ||…

Han Che
- 8,239
- 19
- 70
- 116
1
vote
1 answer
Apollo Link data mutation
I'm trying to mutate the data within an apollo-link handler for an entire application: I want to remove all edges/nodes as to simplify the handling of the data within my application.
const consoleLink = new ApolloLink((operation, forward) => {
…

paweloque
- 18,466
- 26
- 80
- 136
0
votes
1 answer
How to use these 4 all together in apollo client in Apollo refresh token
const client = new ApolloClient({
cache: new InMemoryCache({ possibleTypes }),
link: from([authLink,refreshTokenLink,httpLink, errorLink]),
});
This is my apollo code and on these these
link: from([authLink,refreshTokenLink,httpLink]) are working…

Rover
- 661
- 2
- 18
- 39
0
votes
0 answers
Terminate a graphql request from Apollo Link
I have an ApolloLink setup for the AWSAppSyncClient in my React project to check if the user is authorized to make the graphql request. If the user is not authorized then, link should not invoke the forward method rather just return an Error for…

Nitesh
- 1
- 2
0
votes
1 answer
Understanding the mechanism of a chain of methods
I do not understand this for both redux-middleware and apollo-links. How all these functions are executed in sequence and then pass the context to each other
Can someone please explain it to me?

milad shiriyan
- 296
- 1
- 9
0
votes
1 answer
Apollo Client RetryLink has no headers in response
I've implemented a RetryLink into my Apollo Client as follows:
const retryLink = new RetryLink({
attempts: (count, _, error) => {
return count <= 5 && !!error;
},
delay: (count, operation) => {
const {response: { headers }} =…

pgr3931
- 417
- 4
- 11
0
votes
2 answers
convert data to error in a custom ApolloLink
I'm trying to create a custom ApolloLink that converts specific graphql data to an error which will be passed to the onError link. The omg help! error is successfully passed as a network error to onError, but I also get a run time error in my…

thumbsupep
- 161
- 1
- 5
0
votes
1 answer
extend apollo mutation timeout
I'm running down a rabbit hole so I'm asking my question here.
I have a useMutation mutation that uploads up to 10MB JSON data to my DB. This obviously takes a long time and I received a timeout error which I believed caused the query to run twice…

Kevin Danikowski
- 4,620
- 6
- 41
- 75
0
votes
1 answer
Using graphql-tools, apollo-link-schema, and react-hooks always returning undefined when mocking
I'm new to using GraphQL in React and have been moving a project from a REST API to a new GraphQL one. As part of this, I wanted to setup mock data to work on the application independent of the GQL API being completed. I've spent a bunch of time…

TechyTech
- 455
- 2
- 13
0
votes
1 answer
Is there a way to have an HTTPS endpoint for apollo react?
Following the apollo react documentation works fine when I have an http url, but when I use an endpoint with SSL then I run into CORS errors.
import { ApolloClient} from 'apollo-boost';
import { HttpLink } from 'apollo-link-http';
const link = new…

mmborado
- 23
- 5
0
votes
0 answers
React native asyncstorage and apollo-link console log not being called in promise
I'm trying to console.log in the authLink function, but don't see any console log output. It's as if the function itself is never being called.
Anyone have any ideas why I can't see any console.log output when calling it inside the authLink?
import…

Some dood
- 85
- 5
0
votes
0 answers
Apollo, AppSync, Warning about missing field
I'm getting this warning:
backend.js:6 Missing field getCurrentConfigurations in [
{
"id": "135631",
"zone": {
"id": 2,
"name": "ZONA 1",
"color": "#ba9b
It's a warning but my entire app has sometimes some weird behaviours. So I…

pmiranda
- 7,602
- 14
- 72
- 155