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

Is it possible to share the Apollo cache in React Native and iOS/Android?

If I build an app that has both React Native and native (iOS/Android) views, is it possible to make Apollo use a single unified cache to store the normalized data? This would be extremely useful to make sure the data is consistent across views, and…
helfer
  • 7,042
  • 1
  • 20
  • 20
2
votes
1 answer

Apollo GraphQL Subscriptions

I'm having trouble with GraphQL subscriptions in Apollo. I want to subscribe to added "perspectives" on topics (basically added comments on posts), and I'm pretty sure I have the server set up correctly. The client is what's giving me trouble. (If…
user7594529
2
votes
1 answer

Apollo Client Delaying the Authorization Header

I am using Apollo (with Graph Cool), redux, and Auth0 in a React-Native app. I am trying to delay the queries and mutations until the header is set. The idToken is stored in Async Storage, and is therefore a promise. I can't use redux to pass the…
Matty
  • 277
  • 5
  • 17
2
votes
1 answer

How to add nested resolver to schema?

Let's say my query looks like this: query { post { id user { id, name } } } And resolver map looks like this: { Query: { post: myPostResolverFunc, } } How I can add additional "nested" resolver for post.user? I tried this but…
user606521
  • 14,486
  • 30
  • 113
  • 204
2
votes
1 answer

Connecting Apollo to Meteor Mongo

I'm working with Meteor, and I want to start using Apollo to connect to multiple databases in my application. Unfortunately, almost all the documentation I can find involves connecting to outside servers like remote MySQL servers. So how can I get…
mstorkson
  • 1,130
  • 1
  • 10
  • 26
2
votes
2 answers

Multiple create and update using apollo graphql

I am trying to create an apollo graphql mutation which can insert multiple rows into DB. This is my schema structure: export default typeDefs = [` type OptionDataObject { id: Int, UserID: Int, TypeID: Int, Value: Int } type OptionData { …
Abhi
  • 51
  • 4
2
votes
1 answer

Pass parameters to sub nodes resolvers functions

I have this graphql query, its looking for all services associated with a project( given its id ) and for each services, it returns the list of users who have access to. query Project ($id: ID!) { services { mailService { users } …
2
votes
1 answer

Automatic UI updates with Apollo in Swift not working

I have the following setup for a small Apollo iOS app where I display a list of conferences in a table view and want to be able to add a conference to the list: GraphQL: query AllConferences { allConferences { ...ConferenceDetails …
nburk
  • 22,409
  • 18
  • 87
  • 132
2
votes
1 answer

Apollo Graphql Custom Scalar JSON - complains "TypeError: type.getFields is not a function"

I'm working on an apollo-express graphql server. I attempted to integrate the module 'graphql-type-json' but when I followed this description on how to integrate, I've tried many things but it seems that the type isn't being passed to the resolver…
RobotBox2000
  • 23
  • 1
  • 5
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

Redux server side rendering breaks when using an apollo graphql client

When I'm using an apollo provider with redux server side rendering, https://github.com/reactjs/redux/blob/master/docs/recipes/ServerRendering.md I get the following warning and it breaks the server side output Warning: Failed context type: The…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
2
votes
1 answer

When querying for a single item in graphql, meteor, and apollo i get null values returned

I have probably overlooked something in the docs, but I have seem to run into a problem with being able to get a single object from my graphql queries. Here is the schema: type Query { product(name: String!): Product } type Product { _id:…
user3119898
  • 27
  • 1
  • 1
  • 5
2
votes
1 answer

How to updateQueries when the Query contain edges and node with Apollo?

I use react-apollo on my React application for request a GraphQL API. I want to add an item and update my query after this add. The item is added correctly but I can't update my query. I have to refresh my page to see my new item. I follow this…
Nevenoe
  • 1,032
  • 3
  • 14
  • 37
2
votes
2 answers

Apollo GraphQL: Calling a Query Twice with apolloClient.query?

I have the following query: const GET_MY_USERINFOFORIMS_QUERY = gql` query($userID: String!){ myUserDataForIMs(userID:userID){ name_first name_last picture_medium } } `; const withUserInfoForIMs =…
VikR
  • 4,818
  • 8
  • 51
  • 96
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