Questions tagged [apollo]

Apollo is a GraphQL client and cache for JavaScript, iOS (Swift) and Android.

Apollo is a flexible, fully-featured client for every platform.

Apollo is made up of a family of technologies you can incrementally add to your stack: Apollo Client to connect data to your UI, Apollo Engine for infrastructure and tooling, and Apollo Server to translate your REST API and backends into a GraphQL schema.

It has implementations for JavaScript, iOS and Android. The JavaScript client has integrations for React, Angular, Vue.js, Ember.js and more.

Apollo is fully compatible with any server that implements the GraphQL specification.

4536 questions
2
votes
1 answer

Apollo can't access queryVariables in update: after a mutation

I am trying to use update: to update a query after performing a mutation. The problem is that the query in the store has several different variables applied and I would like to update the query and return it with the same variables. I found in the…
2
votes
1 answer

apollo client delete from store without mutation

I need to remove a "record" from the local store by id without using mutation because the server does not support mutations. I have tried to access manually the store like that: delete this.apolloClient.store.getState().apollo.data['1112'] this…
Zeev G
  • 2,191
  • 21
  • 37
2
votes
0 answers

add/remove item from apollo cache, change cache data order

I wonder what is the best (if even possible) way to do the following: For example, let's imagine a page with two lists: all series and favorite series. I get those lists ordered by rating from the server with this query: query { series { id …
George
  • 988
  • 2
  • 10
  • 25
2
votes
1 answer

Any reason I am getting back the query name in the GraphQL results?

Using the makeExecutableSchema with the following Query definition: # Interface for simple presence in front-end. type AccountType { email: Email! firstName: String! lastName: String! } # The Root Query type Query { # Get's the…
Dallas
  • 888
  • 3
  • 10
  • 24
2
votes
1 answer

React / Apollo shared query state

I have a very simple app, with a list view and a detail view. The list view is wrapped with a graphql query that maps to a data prop containing an array of items. Selecting one item instantiates a detail view, where the id of the item is used to…
UncleCheese
  • 1,584
  • 9
  • 14
2
votes
2 answers

Server side rendering with Apollo: getaddrinfo ENOTFOUND

I'm running Apollo/React with Express and I'm trying to get server side rendering to work. The Apollo docs suggest the following initialisation code for connecting to the API server: app.use((req, res) => { match({ routes, location:…
Bart
  • 1,600
  • 1
  • 13
  • 29
2
votes
1 answer

readQuery not working with pagination in Apollo & GraphQL app

I've got the following setup for my app. I have a LinkList component that renders a list of Link components. Then I also have a CreateLink component to create new links. Both are rendered under different routes with react-router:
nburk
  • 22,409
  • 18
  • 87
  • 132
2
votes
2 answers

Optimistic UI Not Updating - Apollo

After making a mutation the UI does not update with a newly added item until the page is refreshed. I suspect the problem is in the update section of the mutation but I'm not sure how to troubleshoot further. Any advice is much appreciated. Query…
kybak
  • 820
  • 3
  • 13
  • 28
2
votes
1 answer

Meteor Methods vs. GraphQL Mutations

I have an existing codebase that uses Meteor methods to take requests from the client and perform database operations on the server. I'd like to attempt to move this project to GraphQL but I'm having trouble understanding the scope of that work,…
Jon Cursi
  • 3,301
  • 4
  • 27
  • 53
2
votes
1 answer

android graphQL apollo

I'm using apollo-GraphQL for API response. I have set token in Interceptor class. In main activity I'm using apolloClient, in which I'm passing query to fetch data. I'mm getting API response from interceptor class but not getting query…
Sehrish Fiaz
  • 57
  • 2
  • 7
2
votes
2 answers

GraphQL type composition

I am exploring graphql and the question that is troubling me is if i can do some kind of type composition when defining my graphql server. Let's assume that I have Person and Company in my collection. I having something like this: const Person = new…
jano
  • 735
  • 7
  • 20
2
votes
1 answer

Cannot initialize form data using redux-form, react-apollo, and graphql

I need to initialize form data from state - but because i have 2 containers, one graphql container and one redux container, I'm not sure how to do it. I am also using
from semantic-ui-react. When component is rendered, the console.log's…
Jenna
  • 111
  • 2
  • 8
2
votes
2 answers

React GraphQL Apollo - how to fetch multiple times at once

I have a component which fetches data with one query with a parameter. I'd like to make this component call this query twice, with different parameters based on props (so maybe later even more-times). How can I achieve this? This is example of my…
user3696212
  • 3,381
  • 5
  • 18
  • 31
2
votes
0 answers

Not updating data at view using redux / apollo graphql

When add/edit/delete record then not showing updated data at dashboard list page. Also not working this.props.data.refetch(); whenever data coming in this.props.data. But this.props.data.refetch() getting {}. I am using Material UI Table to show…
Pankaj
  • 169
  • 2
  • 11
2
votes
1 answer

ReactClassInterface: You are attempting to define `constructor` on your component more than once. This conflict may be due to a mixin

So, I'm having an issue when attempting to create an Apollo/GraphCool subscription, which is throwing up the following error message: [React Transform HMR] There was an error updating…
TheoG
  • 1,498
  • 4
  • 30
  • 54