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
1
vote
2 answers

How to invalidate apollo android cache?

Here is my apollo client code for caching val apolloSqlHelper = ApolloSqlHelper.create(context,"my_app") val sqlNormalizedCacheFactory = SqlNormalizedCacheFactory(apolloSqlHelper) val cacheKeyResolver = object: CacheKeyResolver(){ …
BraveEvidence
  • 53
  • 11
  • 45
  • 119
1
vote
3 answers

Can't download json schema using gradlew command

I can't figure out how to use the gradlew command to convert my GraphQL schema into a JSON file as it is specified in the documentation. I opened CMD in my project folder, ran the gradlew command once, and it gave me this error: Project 'module' not…
Daniel Bertoldi
  • 359
  • 4
  • 14
1
vote
1 answer

How to use Apollo Android from Kotlin, but without Android?

I want to use Apollo Android to query the GitHub GraphQL api, using Kotlin with the Gradle Kotlin DSL but not on Android. Error message I do run into a specific problem, but that's probably because there is something wrong in my setup elsewhere. To…
PHPirate
  • 7,023
  • 7
  • 48
  • 84
1
vote
1 answer

Apollo Android Client and JetPack Support

I'm new to GraphQL and Apollo clients. My situation is that I'm making an Android app, I want to use JetPack libraries and components, and the web service for the app is using GraphQL. I'm trying to decide whether to use the apollo-android client,…
Cartesian Theater
  • 1,920
  • 2
  • 29
  • 49
1
vote
1 answer

Why doesnot ApolloQueryWatcher trigger after a mutation change data?

After following Support Caching in Apollo Android here: Support For Cached Responses for Android And already tried to query offline and it works fine and data is coming from the cache First scenario after opening the app is loading the list of…
1
vote
1 answer

Android Studio can't import a java from 'generated_java' folder

I implement a package 'apollo-android' and generate 'FeedQuery' java file from the 'schema.json'. But I can't import that 'FeedQuery' java file to my project.
1
vote
1 answer

graphql is not compiling in android if a list type is added in mutation query

I am trying to build a mutation query with the input having a list and other data and while compiling it is throwing an error. Here ItemData is a list type and if I remove it the code is compiling properly. The query is validating inside the AWS…
Rakshit Nawani
  • 2,604
  • 14
  • 27
1
vote
0 answers

java dependency(maven, gradle) and scala(sbt)

I'm from javscript side and now learning scala and java ecosystem. At javascript, It was simple as npm install/yarn add, but here in java ecosystem seems a bit complex to me. I've started scala with apache kafka. and then learned little bit of…
Roniel
  • 13
  • 5
0
votes
0 answers

Cannot resolve symbol 'SQLNormalizedCacheFactory'

I'm trying to use Apollo's SQLNormalizedCacheFactory in my project. But even after adding the dependencies, I cannot import the SQLNormalizedCacheFactory class in my project. But I'm able to import NormalizedCacheFactory class in my…
nandha-dev
  • 153
  • 1
  • 3
  • 11
0
votes
0 answers

Why i can't use String array parameter in Graphql query Android/kotlin

The query is : query profile( $fields: [String!]! ){ fetchProfile( fields: $fields ){ data } } and Query Variables is: {"fields": ["Total","Safe","Eco"]} When i try to Build , i get Error: Variable `fields` of type…
Tarık
  • 99
  • 6
0
votes
1 answer

How to read Apollo Normalized SQL cache in andorid?

I am using Apollo Normalized SQL Cache for caching the user data such as user id, name and phone number in Android. Is there a way that I could fetch that information whenever I need irrespective of the query being fired or not? The response of the…
Ayush Sahu
  • 59
  • 1
  • 7
0
votes
0 answers

convert content URI to FileUpload

I get content URI from getContent and I want to convert it to FileUpload object upload : FileUpload(mimetype) { override fun contentLength(): Long { TODO("return contentLength here") } override fun fileName(): String? { …
Omar khaled
  • 51
  • 3
  • 7
0
votes
1 answer

How to get HTTP status code in GraphQL apollo-android client

I am using apollo client https://github.com/apollographql/apollo-android to query Graphql API. In Graphql Server, we are returning with HTTPS status return Response.status( Status.BAD_REQUEST ).entity( exception.getMessage() ).build(); How can I…
rishabhjainps
  • 410
  • 1
  • 5
  • 14
0
votes
1 answer

apollo-android requests to express-graphql always result in http 400

I'm having issues getting the most basic of graphQL to work when submitted via apollo-graphql to an express-graphql webapp. Via a web request through graphiql, everything works fine. As soon as I try to use apollo-android client, I get 400 errors…
0
votes
1 answer

Apollo GraphQL with Vertx Subscription failed

I'm running Hasura GraphQL on docker instance(window machine) exposed at http://192.168.99.100:8080/v1/graphql I want to perform subscription in my verticle but getting the following exception: …