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
11
votes
1 answer

Duplicate object types in Apollo GraphQL for Android

On my project GraphQL schema the object AllowedPeriod (it's just two fields startsAt/endsAt) can arrive inside different objects of the graph. When generating queries, apollo is creating a new type for every .AllowedPeriod For…
Budius
  • 39,391
  • 16
  • 102
  • 144
7
votes
1 answer

How to make auto generated classes of apollo graphql client, Parcelable

I am using GraphQL with my Android Project. I got into trouble when passing results(objects of the auto-generated class by Apollo in the build folder) to another activity by extras. How can I make those auto-generated class parcelable?
chathura
  • 3,362
  • 6
  • 41
  • 68
6
votes
1 answer

Getting "error: GraphQL schema file should contain a valid GraphQL introspection query result" after apollo schema:download

So I set up the graphql server described here Now, I want to generate android queries against this server using apollo android as per these instructions. I've tried different folder configurations for the location of the generated schema against…
Senkwe
  • 2,256
  • 3
  • 24
  • 33
5
votes
0 answers

Integrate existing AWS Amplify project into Android project

I found plenty of resources explaining how to create new AppSync projects and hooking them up to an Android project. But nothing on how to connect an existing AppSync project to an Android project. I went through everything at…
EZFrag
  • 317
  • 12
  • 29
5
votes
2 answers

Can apollo-android be used as a java client?

I'm working on a spring boot app that needs to talk to the Github GraphQl API. Can apollo-android be used for this purpose? Since all of it's scarce documentation available as well as the sample project is written with android in mind, I'm not sure.
muaazsaleem
  • 83
  • 1
  • 6
4
votes
0 answers

Can't access Apollo classes in Kotlin Multiplatform project

I've just created a new KMP project from Android studio, added Apollo MP as defined here: https://www.apollographql.com/docs/android/essentials/get-started-multiplatform/ plugins { // ... id("com.apollographql.apollo").version("2.5.3") …
4
votes
2 answers

Apollo Android Client - Cannot access generated classes on classpath

I've generated the Apollo classes successfully and can see them in the build directory, however they're not available on the classpath. Strangely the Enum that is generated is available but the classes themselves aren't. Running the sample project…
Michael.
  • 980
  • 12
  • 16
3
votes
1 answer

Is it possible to use apollo-android v2 with Gradle 5?

The docs for v2 say that Gradle 6.x recommended. In 5.x, Gradle Metadata needs to be enabled by putting this into settings.gradle enableFeaturePreview("GRADLE_METADATA") Which says that 6.x is just recommended, but when I try to use Gradle 5 I get…
RyPope
  • 2,645
  • 27
  • 51
3
votes
0 answers

How to get file upload progress in Apollo GraphQL client Android

I've been looking ways to show upload progress in apollo graphql android library. If anybody has done it please share the code.
Mubarak Basha
  • 341
  • 1
  • 7
  • 17
3
votes
1 answer

Android apollo subscriptions not working?

I need to integrate subscription in my Android app. The subscription works fine on localhost in graphiql. I have deployed my backend on Heroku. I am using apollo-server and not hasura. My subscriptions are not working for the url given by Heroku but…
3
votes
2 answers

How could I get schema.json of https://example.com/graphql using apollo-tooling

I am currently writing a third-party client for a website, but it doesn't expose interface, so I try to crawl datas by myself. The website uses GraphQL, so I use apollo-android in my project, By reading README.md of apollo-CLI, I still have trouble…
zyzhang
  • 75
  • 1
  • 9
3
votes
1 answer

How to create a JSON CustomTypeAdapter in Apollo GraphQL on Android with Kotlin

I'm struggling to figure out how to add a CustomTypeAdapter to my ApolloClient. For a mutation, our server is expecting json input. The corresponding iOS app is passing in a json string. When I pass in a string I get a message asking if I've…
Dittimon
  • 986
  • 2
  • 14
  • 28
3
votes
0 answers

Are there any Java based Graphql client to invoke graphql server from java code?

My application (spring-boot application) is going to invoke a set of graphQL services hosted in different server. My java code (server side) needs to invoke those services to fetch & update data. I'm looking for Java based GraphQL clients (API) so…
bpa.mdl
  • 396
  • 1
  • 5
  • 19
2
votes
3 answers

How to catch exceptions from ApolloClient watch method?

This code - manual query execution without watch - throws an exception as I expect it (due to an intentionally wrong server url not shown here): try { val response = apolloClient.query(MyQuery()).execute() } catch (e: Exception) { …
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
2
votes
1 answer

com.apollographql.apollo.exception.ApolloHttpException: HTTP 500 Internal Server Error

I keep getting the HTTP 500 Internal Server Error in my android studio trying to call a loginQuery with apollo client for android, following this tutorial : link to apollo docs Yet when I run the same query in graphiQL in my browser, it…
itwabi
  • 125
  • 10
1
2 3 4