Questions tagged [apollostack]

The Apollo GraphQL platform is an implementation of GraphQL that helps you manage data from the cloud to your UI.

Read more about the entire stack here: Apollo Platform

106 questions
3
votes
1 answer

Apollo: data / mutation prop not passed to component

I have the following component with a query and a mutation, but my Component does not receive the data and the mutation prop. Am I doing something wrong or missing in my code? The query does get executed though, it's just not passed down.…
mxmtsk
  • 4,285
  • 6
  • 22
  • 47
3
votes
1 answer

Apollo Subscription doesn't seem to get called on Mutation

New to Apollo, so I decided to take the most simple example I found and try to work it in a slightly different way. My code can be found here. The problem I am having is that the Subscription doesn't seem to get called when I call the Mutation…
CodeChimp
  • 8,016
  • 5
  • 41
  • 79
3
votes
2 answers

Can I wrap the root component created by wix/react-native-navigation in an ApolloProvider component

I'm using Meteor's Apollo Client in conjunction with wix/react-native-navigation and I was wondering is it possible to wrap the root component created by Navigation.startSingleScreenApp in an ApolloProvider component? I've tried putting the…
apeman
  • 390
  • 5
  • 18
3
votes
1 answer

Using Promises with Mutation Queries in GraphQL/Apollo?

I'm running the following mutation query in http://localhost:3010/graphiql: Mutation mutation($fromID: String!, $toID: String!, $msgText: String!){ createIM(fromID: $fromID, toID: $toID, msgText: $msgText){ fromID toID msgText …
VikR
  • 4,818
  • 8
  • 51
  • 96
3
votes
1 answer

Apollo GraphQL Mutation (Object Argument)

So, I'm trying to design my Apollo server. I wanted to create a mutation with an object as a parameter. Here is a snippet of my schema which somehow caused the problem: I thought it was syntactically correct, but I ran into this error:…
Giovanni Lobitos
  • 852
  • 7
  • 19
2
votes
0 answers

How can I make managed federation work offline?

I wanted to set up Apollo Studio for an Apollo Federation API following this guide. In there I stumbled upon the following sentence regarding the serviceList in the gateway: With managed federation, this information is no longer hardcoded in the…
puchm
  • 137
  • 7
2
votes
1 answer

Network error: Converting circular structure to JSON on refetch

This is quite a weird problem. I have a fairly simple query, which runs perfectly well in Graphiql no matter how many times I trigger it But in browsers the problem appears when I call data.refetch(). Most strange that in Chromium I get Network…
Daniel Khoroshko
  • 2,623
  • 15
  • 26
2
votes
0 answers

Apollo GraphQL: Lazy loading data after SSR

I have the following code: const HomeWithApollo = withApollo(compose( graphql(HOME_QUERY, { props({ data: { loading, page, fetchMore } }) { return { loading, page, fetchLocations: () => { …
j0e
  • 1,441
  • 1
  • 15
  • 17
2
votes
0 answers

How to determine when to display an ajax loader with Redux + Apollo Client

I have a global loader element. The loader spins when the app performs any network operation. I recently integrated with Apollo Client but I am not entirely sure entirely the best approach for examining whether Apollo is currently…
dipole_moment
  • 5,266
  • 4
  • 39
  • 55
2
votes
1 answer

how to update a query props.data after a query onClick

I'm using Apollo to execute 2 queries, the first query is executed automatically by Apollo, the second query is executed when a button is clicked, and the results of this query should update a part of the first query (just like updateQueries does…
tahayk
  • 492
  • 1
  • 5
  • 20
2
votes
1 answer

In Apollo GraphQL, how do I setup a resolver to not loop values?

I'm using Sequelize in Node.js with Apollo-Server and Express.js. When making queries that go deeper and deeper, GraphQL is looping my models and doing a separate query by ID on each of those. For example, if I get user(userId) > playthroughs >…
Kevin Ghadyani
  • 6,829
  • 6
  • 44
  • 62
2
votes
0 answers

How to make a sub query (or join) in GraphQl?

I am trying to wrap my head around GraphQl, more precisely on sub queries. I have two tables: Products and Likes, the two have a common "userId" column. How could I count the total number of likes for each product from the Likes table based on the…
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
2
votes
0 answers

Passing a Mongo modifier as a GraphQL mutation argument

I'm trying to figure out the correct schema to pass a Mongo modifier as argument to a GraphQL mutation. Here's a sample modifier: { $set: { foo: 'hello world' }, $unset: { bar: '' } } I'm sure this is very simple, but I just can't…
Sacha
  • 1,987
  • 1
  • 24
  • 41
2
votes
1 answer

Apollo GitHunt-React: updateCommentsQuery?

I'm working on Apollo pub-sub using examples from GitHunt-React and GitHunt-API. My subscription resolver is successfully firing when a new record is added to the database it is watching. Now I need to connect my client to the results being sent by…
VikR
  • 4,818
  • 8
  • 51
  • 96
2
votes
2 answers

How to cascade GraphQL?

I'm currently using "client side GraphQL server" to wrap RESTful endpoint to GraphQL endpoint. But what if server side is also a GraphQL endpoint? How can I queue another GraphQL server in a GraphQL server by a lightweight way? Or more generally,…
林东吴
  • 171
  • 1
  • 8