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
1
vote
1 answer

Apollo client recursive mutations

Is the following example possible with apollo-client? For an example an easy ToDo application and bad internet connection: no internet connection (1. mutation) create a new todo (1. mutation => optimistic update) show the new todo (local…
ManAnRuck
  • 234
  • 2
  • 10
1
vote
1 answer

Recursive queries in a batch with Apollo (graphql)

Facebook flaunted ability to commit recursive queries when opening graphql, I'm struggling to find documentation that permits you to do it efficiently (networking wise) and easily. To be precise I'd like query child (name) > name child (curName) […
janat08
  • 1,725
  • 2
  • 16
  • 27
1
vote
0 answers

Apollo Client - Error: Could not find query inside query map

I have a problem with Apollo Client-React. I want to send a login request when the user doing click in Log In button. My code is: // @vendors import React from 'react'; import { withApollo } from 'react-apollo'; import ApolloClient from…
saeta
  • 4,048
  • 2
  • 31
  • 48
1
vote
2 answers

Circular error on Apollo Client when trying to refetch

My App component has a reload button. Clicking reload should essentially perform refetch by re-triggering the graphql query. The way I am currently performing the reload is by using Apollos's refetch function when the user click reload. However, the…
dipole_moment
  • 5,266
  • 4
  • 39
  • 55
1
vote
2 answers

FlowRouter is not recognized inside of an apollo (graphql) query

I’m having a problem when using react-apollo with FlowRouter (in a meteor project). This is my graphql query (it is supposed to update each 5 seconds): @graphql(myQuery, { options: { pollInterval: 5000, variables: { userId:…
sonlexqt
  • 6,011
  • 5
  • 42
  • 58
1
vote
1 answer

ApolloClient timeout best option

I came up with this way of doing network operations with ApolloClient but the problem is that the code looks very ugly and difficult to read, considering I have to write dozens of queries like this, it becomes tiresome and unmaintainable. I haven't…
Computer's Guy
  • 5,122
  • 8
  • 54
  • 74
1
vote
1 answer

What does the optimisticResponse look like for an array result?

This is for a list where items can reordered where the mutation input is the reordered array, and the mutation result is a list of photos in the new order after they have been saved to the database. The actual mutation works great, but I don't know…
atkayla
  • 8,143
  • 17
  • 72
  • 132
1
vote
1 answer

Apollo GraphQL: Schema for Query to Return Objects of Different Types?

I have three different PostGres tables, each containing different types of associates. The database fields are different for each type-- that's why they are in three separate tables. I have one component that can potentially access any type of…
VikR
  • 4,818
  • 8
  • 51
  • 96
1
vote
1 answer

Meteor Apollo not updating UI when we update collection from Mongo console

I started using meteor apollo starter kit https://github.com/apollostack/meteor-starter-kit , and I created a collection "Posts" and I am able to pull data in to the UI. But when I update collection from mongo console, it is not updating UI…
1
vote
1 answer

Apollo GraphQL: Child Component Re-Runs Parent Query?

I've got a parent component with an Apollo query attached: const withData = graphql(MY_QUERY, { options({ userID }) { return { variables: { _id: userID} }; }, props({ data: { loading, getOneUser } }) { …
VikR
  • 4,818
  • 8
  • 51
  • 96
1
vote
1 answer

Graphql run a certain query from a set of multiple queries - ApolloClient

I want to store my queries in an external file, let's say: query GetAllTodos { todos{ _id todoMessage createdAt } } query GetAllTests { tests } Is it possible somehow to load the entire file in a single string pass that string to…
Marius
  • 3,253
  • 5
  • 25
  • 29
1
vote
1 answer

Apollo Query Works in GraphIQL but Not in Call to graphql()?

I have an Apollo query that works correctly in localhost:3010/graphiql: QUERY query getIMs($fromID: String!, $toID: String!){ instant_message(fromID:$fromID, toID: $toID){ fromID, toID, msgText } } QUERY VARIABLES { "fromID":…
VikR
  • 4,818
  • 8
  • 51
  • 96
1
vote
1 answer

React-Apollo incoherent data

I've been trying Apollo out with React and am currently facing a problem with it. I have basic data where a Product belongs to many Categories query getProduct{ product(id: 1){ id name categories{id,name} } } As…
zbenhadi
  • 23
  • 1
  • 4
1
vote
0 answers

GraphQL fragments of different types in apollo

Edit: @helfer suggested this might be a bug. Github issue For a new application I am using Apollo to do the graphql management for me. I have multiple types that can also contain other types. To simplify my life as a developer I want to use…
Julius Breckel
  • 434
  • 3
  • 14
1
vote
1 answer

GitHunt-React: Declaring `loading` Property?

I've duplicated the following code (and all the other relevant code I could find) from GitHunt-React to my app. This code is from CommentsPage.js: const CommentsPageWithDataAndMutations = graphql(COMMENT_QUERY, { options({ params }) { return…
VikR
  • 4,818
  • 8
  • 51
  • 96