Questions tagged [apollo-android]

Apollo GraphQL client for Android, written in Java

Apollo-Android is a GraphQL compliant client that generates Java models from standard GraphQL queries. These models give you a type-safe API to work with GraphQL servers.

Documentation & Repo

60 questions
2
votes
0 answers

Can I use a .gql schema in Apollo Android? (Not generating classes)

I'm encountering issues trying to set up my GraphQL queries using Apollo Android. I have a .gql schema instead of a json schema. I managed to set it up with Apollo iOS client, so I can only assume the schema is fine, and that Apollo Android supports…
Markk
  • 86
  • 3
2
votes
0 answers

Apollo Rx Query With Single

Apollo Android Client support RxJava2. They support Observable< Response< T> > Single Completable From official doc val query = EpisodeHeroNameQuery(episode = Episode.EMPIRE.toInput()) val observable =…
Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
2
votes
0 answers

How to incorporate Apollo-android in a project with many modules?

I have an Android project that uses graphql to communicate with the server. It has many modules. Each has its own graphql queries / mutations, but they share the same schema. At the moment I am running into an issue where Apollo automatically…
2
votes
0 answers

Apollo sends subscription as GET

my tech setup is as follows: GraphQl via Apollo AWS as backend Native Android App written in Kotlin GraphQl queries and mutations work without any problem. I have the following Issue: When creating a subscription the execution produces a GET instead…
Koerfer_P
  • 341
  • 2
  • 13
2
votes
1 answer

Apollo GraphQL - Is it possible to do the same query requesting different fields?

I am using apollo-android and I want to know if it is possible to do the following approach: I have defined a query called locations in the schema.json of my server. It is defined like this: type locations { continents: [Continent!], countries:…
enoler
  • 179
  • 1
  • 11
2
votes
1 answer

GraphQL: Configure subscription manager

I am new to GraphQL so I want to test somethings before starting my own project. As a test database I am using Prisma test database(s) and service(s) and Apollo Android as a library in my application. I am almost done with query and mutation. As a…
Mirjalal
  • 1,292
  • 1
  • 17
  • 40
2
votes
1 answer

GitHub GraphQL cursor Pagination on first request

Hi I am using Apollo android to get a list of repositories with a keyword from the Github GraphQl I have to add cursor based pagination as well. This is the .graphql file query Search($query: String!,$afterCursor: String!){ search(query:$query,…
Gowsik
  • 1,096
  • 1
  • 12
  • 25
2
votes
1 answer

How to read response headers and write request headers using apollo-android

I'm trying to use apollo-android library to communicate with graphql server. The problem is that backend uses headers to authenticate requests and I found no ways to add them. Also in auth request the token is sent in headers and I found no ways to…
Vlad Kudoyar
  • 371
  • 3
  • 8
2
votes
1 answer

How to import generated class from Apollo Client (GraphQL) in Android Studio

I'm new to Android studio and want to write a small example app with GraphQL and the Apollo Client. I've successfully setup my build environment and the automated code generation. Here's a screenshot of the file structure,…
nburk
  • 22,409
  • 18
  • 87
  • 132
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
1
vote
1 answer

View Apollo cache during Android app development?

Is there any Android Studio plugin or other way to check the content of the Apollo client cache? I have a GraphQL plugin tab in Android Studio but I can't find a functionality there to view the cache? Update: I currently have this plugin but the…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
1
vote
0 answers

ApolloNetworkException sometime on Apollo Mutation on Android

I am using ApolloClient for Android. Sometime one mutation api failed with ApolloNetworkException. Problem is i can't generate in debugging. This exception occurs sometime in live version as i got some firebase non fatal log for this. And the…
Abu Yousuf
  • 5,729
  • 3
  • 31
  • 50
1
vote
0 answers

Apollo Android - Failed to parse GraphQL file. Unknown variable type

I'm getting a compilation error from one of my apollo tasks, as Android Studio attempts to generate the classes based on the given schema(s). I've got two services/endpoints that I'm referencing in my solution: public & private. They are defined as…
1
vote
1 answer

Apollo GraphQL migration from v1 - 2

I am trying to update my Apollo implementation from v1.3.3 -> 2.5.4. I've followed the migration guide which is super simple but whenever I do it I get the following error. Execution failed for task…
Joel Nieman
  • 746
  • 4
  • 13
1
vote
0 answers

Why I am getting 'ApolloParseException' after upgrading from 1.0.0-alpha to 1.0.0?

I am currently upgraded an old project's Apollo version from 1.0.0-alpha to 1.0.0 . After upgrading I am getting this Exception com.apollographql.apollo.exception.ApolloParseException: Failed to parse http response at…
RagAnt
  • 1,064
  • 2
  • 17
  • 35