Eduard Boloș
04/04/2025, 10:42 AM@optional
directive when used on a non-nullable object. In the generated model, the respective field becomes nullable, but in the *Selections
object, the annotated field's type is still marked with .notNull()
, making it a CompiledNotNullType
. Is that on purpose?
Context: we do some shenanigans in our CacheResolver
to avoid some cache misses by returning null instead of nullable fields, and we were trying to do this for a field that is marked not null in the schema generated from the backend, so that we can successfully execute the query even if the user is offline (e.g. with NetworkFirst
).John Marshall
04/07/2025, 3:51 PMMarco Pierucci
04/08/2025, 10:50 AMFailed to execute GraphQL http network request
(Underlying cause is unknown host exception)
Is somethign expected from apollo? Or maybe someones knwo this is an android config thingy?fred
04/09/2025, 7:59 AMEduard Boloș
04/29/2025, 10:34 AMid
field is not included for objects that have such a field? Or do you think that this is something that could be part of the Apollo tooling? We are using id
as the cache key in our CacheKeyGenerator
implementation, and it would be useful to have such a check so that people's queries don't mess up the cache by mistake (we had several bugs and crashes due to this 😅)agrosner
04/29/2025, 12:34 PMMarco Pierucci
04/29/2025, 4:05 PMSeb Jachec
04/30/2025, 12:42 PMNullPointerException
crash in ConnectionMetadataGenerator.metadataForObject
that I'm having a hard time understanding 🧵Ife
05/03/2025, 10:03 AM4..0.0
and have autoPersistedQueries
enabled. We're also trying to use the @defer
directives for some high-latency fields. Now the issue, whilst we can see in the logs the incremental data, e.g the attached, we are not able to capture this in the query response itself. I've pretty much logged everything I possible can, no errors and no deferred data.
Any idea what I should try or where to look?Seth Madison
05/07/2025, 3:35 PMUnusedVariable
as an error issue instead of just warning? I can file a github issue about this if folks feel it would be useful/make sense.John Marshall
05/23/2025, 5:03 AMapi(libs.apollo.cache.plugin)
Results in the error: "Apollo: only a single compiler plugin provider is allowed"
How am I supposed to wrap the plugin?Ife
05/27/2025, 1:02 PMnormalised-cache
a go as need the pagination feat however, im getting:
Unexpected JSON token at offset 153301: Encountered an unknown key 'scalarMapping' at path: $.normalizedPath
Use 'ignoreUnknownKeys = true' in 'Json {}' builder to ignore unknown keys.
JSON input: .....lizedPath":"schema.graphqls","scalarMapping":{},"generateDat.....
John O'Reilly
05/28/2025, 12:37 PMBob
05/31/2025, 1:29 AMval fakeQueryData = Query.Data(id = "blah" , name="steve")
ended up with a massing file of fakes for tests and was hoping there are some alternatives.Ife
06/06/2025, 10:49 AMcom.apollographql.apollo:apollo-normalized-cache-sqlite
v4.0.0 which matches apollo
version
Apollo: unhandled exception
java.lang.Exception: Unable to read a record from the database
at com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache.loadRecord(SqlNormalizedCache.kt:25)
Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 3 to 1
John Marshall
06/07/2025, 7:04 PMNormalizedCache.remove(pattern: String)
is removed.
Which is kind of ok, but it would be nice to have a convenience to remove all cache keys associated with a specific type (or cache key scope?), which assuming type was prefixed in the cache keys, was easy to do with this functionJohn Marshall
06/11/2025, 3:07 AMJohn Marshall
06/16/2025, 4:45 AMJohn Marshall
06/17/2025, 6:19 PMCharlie Tapping
06/18/2025, 12:15 PMLukáš Kúšik
07/07/2025, 9:23 AMStylianos Gakis
07/22/2025, 3:52 PMStylianos Gakis
07/29/2025, 12:41 PMfarmerbb
08/04/2025, 11:14 PMStylianos Gakis
08/05/2025, 11:37 AMSeb Jachec
08/06/2025, 1:23 PMString
.Joel Denke
08/07/2025, 6:23 AMfred
08/07/2025, 9:51 AMCreateSomethingMutation
and a SomethingQuery
(code in the thread) — they both return the same thing (semantically), but they're both different from each other in structure/arguments, which means this happens:
• CreateSomethingMutation
is called and we cache its result
• SomethingQuery
is then observed (cache only) but we then get a cache miss
our current workaround is to manually get the result from the mutation and add it to the cache as if it was the result of the query, and then everything works fine, but this seems like a common scenario so I thought I'd check if there's any better way to handle this (e.g. tweaking somehow the graphql structure?)Joel Denke
08/07/2025, 2:53 PMprivate fun ApplicationCall.context(uid: String?): ExecutionContext {
return AuthenticationContext(uid) + DatastoreContext(datastore) + CacheControlContext()
}
Will I then be able to get first parameter in my class methods that using @GraphQLQuery?
Or do I need some kind of singleton holding all deps?
I am trying to use Ktor server DI library, but I dont mind change to something else. Trying to structure my Apollo code better.John Marshall
08/15/2025, 1:42 AM