Tag: apollo-client
-
Pass dynamic key value in grapql query React Native
0 hello all I develope application in react native with qraphql so here is my one of the query { products( filter: {category_uid: {eq: "Mw=="}, bestseller: {eq: "44"}} sort: {name: ASC} pageSize: 10 currentPage: 1 ) { total_count items { uid name sku boutique_name small_image { url label } } } } So in above…
-
Triggering one query is triggering other related ones
0 I suppose its because of cache? But i have Query01 that i trigger using a button click, and Query02 that had run previously, when Query01 runs, it reruns query 02. What is going on?? Here’s the structures: query Query01( $patientId: Something! $externalId: String $externalEncounterId: String! ) { patient(patientId: $patientId) { pastMedicalHistory {} prescriptions {}…
-
Unable to receive raw GraphQL subscription updates using Apollo-Angular 4.2.1 and Multipart HTTP protocol
0 I m using apollo-angular 4.2.1. Our backend team has drop websocket using graphql. we are using Multipart HTTP protocol for GraphQL subscriptions following is my setup for apollo client export function createApollo(httpLink: HttpLink): ApolloClientOptions<any> { loadDevMessages(); loadErrorMessages(); return { link: httpLink.create({ uri, headers: new HttpHeaders({ "Accept": ‘multipart/mixed; boundary="graphql"; subscriptionSpec="1.0", application/json’ }) }), cache: new…
-
Physical Storage of InMemory Cache of Apollo Client
0 According to Apollo Client docs, the InMemory cache is used in the apollo client cache as instantiated in the below code import { InMemoryCache, ApolloClient } from ‘@apollo/client’; const client = new ApolloClient({ // …other arguments… cache: new InMemoryCache(options) }); Reference: https://www.apollographql.com/docs/react/caching/cache-configuration/ Where is this in-memory storage physically created? Is it in sessionStorage or…
-
Graphql cache: Specify a merge function to a query which is nested under a common type
0 Lets say graphql scema looks like this type query { foodInformation: Foodinformation # some other query types carInformation: CarInformation } type Foodinformation { getDishes(): Dishes! getFilteredDishes(input: filterInput): Dishes! # some other quiries } type PageInformation { pageNumber: int pageSize: int totalPages: int totalItems: int } input FilterInput { name: string id: int comment: string…
-
useSubscription Socket errors being thrown in the console
1 I hope you are doing well! We are using web sockets in our website with graphQL hence we are using useSubscription. It is working fine, I get the data back when I need it; however, we are facing a small issue that while it is not stopping our website from functioning, it is extremely…
-
GraphQL only works on production when also running localhost and Apollo Client is set to localhost only
1 Im working an app using react for the frontend and apollo/client and graphql. It works perfectly on the localhost, but when I deploy to heroku it only works if I also have the app running on the localhost. Here is what I have for the uri. const client = new ApolloClient({ uri: ‘https://localhost:5000/graphql’, cache:…
-
Read cache from a different request field
0 With React Native and Apollo client, I am am trying to properly write and read cache from a different request field. I basically ave two object types : ‘User’ & ‘Event’, and I have those " requests : All the events : (Event List screen) events { id numberOfParticipants } Connetced user with events…