Tag: apollo
-
How to implement In memory cache from angular front with graphql Queries?
0 I have angular frontend application, we are fetching data with graphql queries using apollo client. We want to implements caching to fetch the data. Only first time we need to query the data and it should stored in cache , while calling the same next time the data should be returned from the cache.…
-
Apollo Graphql with Angular with headers not being passed
0 I need to add headers to my graphql requests with angular, but I didn’t find any way. Headers is added when I use query but not mutate. Also, mutate will works if I didn’t add headers. Here is my code: import { APP_INITIALIZER, NgModule } from ‘@angular/core’; import { AppComponent } from ‘./app.component’; import…
-
@apollo/client in React, passing header is not working
0 I am trying to pass header in @apollo/client useQueryQuery but it is not getting passed. Click on login button will call loginRequest. Its a REST call which is using Graphql. IMPORTANT -> in loginRequest is getting called at many places, some places need to pass the header and some place not. Below I added…
-
How to apply alias in @key field in apollo federation
0 type oPlayer @key(fields: "id") @key(fields: "name"){ id:ID name: String } extend type oPlayer @key(fields: "name") @key(fields: "PlayerId") { name: String @external PlayerId: ID @external } I am tring to resolve that field using PlayerId field with id but I am not able get data in referance resolver How to provide alias to "PlayerId:id" so…
-
Why is my GQL function getting called repeatedly? [closed]
0 Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 hour ago. Improve this question I am now using React and Apollo…
-
Can’t consume context in my mutation resolver, request object passed instead Apollo Server v4
0 I am trying to pass the pubsub to resolvers. I am able to pass pubsub to subscription ‘subscribe’ functions via the useServer function, and as far as I can tell from research the expressMiddleware context should be passed to all resolvers, but when logging it out I’m just getting the request object. index.ts const…