Stylianos Gakis
06/16/2022, 7:47 AMrunTest
function when coroutines have now their own runTest
as well? And I am not talking just about the name being the same, which is possibly okay if people are aware that they are different things, but also about including coroutine’s runTest
functionality. The powers it gives you like automatic skipping delays, access to advanceUntilIdle
and such have been very helpful for us in our tests, to make them easier to reason about. See example.
I am now at a point where I am using apollo’s runTest at some test but would also like to be able to use coroutine’s runTest, and I was thinking maybe apollo’s runTest can use coroutines runTest instead of runBlocking under the hood at some point? Or do you feel like this can’t/shouldn’t happen?Ryan Fogarty
06/17/2022, 11:56 AMTestBuilders
are being generated in our data modules test package, we cannot access them in other modules where we have acceptance tests. Has anyone found a way around this?Stylianos Gakis
06/20/2022, 1:51 PMStylianos Gakis
06/21/2022, 12:05 PMwasyl
06/21/2022, 12:21 PMnull
and refetches the query. Have you ever thought about some way to do migrations for the cached state of the queries, such that the app can continue working while offline? Such migrations could compute the default values or insert empty/null objects that the query will use for the time being, until it’s refetchedjames
06/22/2022, 2:02 AMGraphQLJSONObject
from https://github.com/taion/graphql-type-json? Is it just a case of defining a custom type adapter here? If so, are they any known adapters baked already for turning this into a map of primitives?subham
06/22/2022, 1:41 PMStylianos Gakis
06/23/2022, 3:02 PMMatt Kula
06/24/2022, 8:58 PMagrosner
06/28/2022, 3:37 PM{
"summary": {
....
},
"response": {
"data": {
vs the expected:
{
"errors": ...,
"data": {
agrosner
06/28/2022, 5:29 PMHttpFetchPolicy
. It is not clear to me whether the http cache has an option for both cache and network both times (cache first, then hit network) . does the CacheFirst
option enable hitting both everytime? the normalized cache supports CacheAndNetwork
Stylianos Gakis
07/04/2022, 12:33 PMRobert Munro
07/07/2022, 9:37 AMApolloClient
? (i.e. with out OkHttp for multi-platform)Nick
07/08/2022, 8:53 PMwatch
for cache changes from both queries, but I end up with a Flow<List<Flow<MyObject>>>
. I'd much rather have a Flow<List<MyObject>>
. Code in 🧵John O'Reilly
07/11/2022, 5:22 PMextra.graphqls: (36, 30): Unknown argument `field` on directive 'nonnull'
The section it's referring to is as follows....was there change made related to this?
extend type Episode @nonnull(field: """
id
name
air_date
episode
characters
created
""")
Grégory Lureau
07/12/2022, 12:49 PMMatt Thompson
07/13/2022, 4:59 PM@nonnull
directive and the docs seem to indicate that using it on a collection should make both the List
and its type non-null, but what I am currently getting is a non-null list of a nullable type, i.e. items: [Item]
-> val items : List<Item?>
. anything I’m missing?Mobile Dev.
07/15/2022, 9:31 PMMarco Pierucci
07/18/2022, 2:11 PMcustomAttributes
Now Im trying to update to apollo 3.4 and switched to nonStandardFields
as suggested.
But now when getting refresh token errors, nonStandardFields
come as null and the actual erros come as:
extensions = {errorClass=VALIDATION, validationErrors=[{message=Please make sure the refresh token is correct., inputPath=[input, input]}]}
extension being : Map<String, Any?>?
🤔wasyl
07/26/2022, 11:36 AMclark
07/27/2022, 4:18 AMSeb Jachec
08/02/2022, 9:52 AMpaginationArgs
as part of a field policy at the moment? I assume there are benefits (or will be benefits to come down the line?) 😄Jan Skrasek
08/03/2022, 8:18 AMIf two sibling modules use the same schema type and this schema type wasn't generated upstream, each module will generate its own version of the schema type, which could clash. To prevent this, Apollo Kotlin registers a global "check${service}ApolloDuplicates" task that will fail if there are duplicates.Hello. I do not much understand this. • Could clash means exactly what? Our two modules has different package names, so I guess they cannot clash, can they? • Is the check "preemptive" in a way it fails even they do not clash (because of those package names)? Thank you 🙂
Paddy O'Brien
08/03/2022, 2:14 PM{
__typename
name: String
value: Type
}
Where Type
varies from union member to union member.
In V2 Type
was generated as a dataclass. Admitedly the types are Any
and do no preserve the graphql types.
Is there a way to trigger this behaviour in v3? or do we need to rewrite thew query using aliasesChris Fillmore
08/05/2022, 5:43 PMApolloSubscriptionCall.Callback
had onFailure
and onTerminated
. How are these exposed in Apollo 3.x?
Can I .catch
?
subscriptionCall.toFlow()
.catch { ... }
.collect { ... }
Stylianos Gakis
08/09/2022, 11:42 AMfun DefaultUpload.Builder.content(file: File): DefaultUpload.Builder
here it seems like the line file.source().buffer()
shouldn’t be there? Not an okio expert so bear with me 😄
We were using this function at some place where we forgot to migrate to File.toUpload()
and we were experiencing that empty files were being sent over to the backend. And from my understanding I guessed that it probably happens from reading its contents somewhere since they’re readable only once. And in this function its seems like we’re reading the entire file into a buffer effectively emptying it out for the next time we do buffer()
again, so that is why it’s then empty. After we migrated to File.toUpload()
it seems like our files get sent to the backend properly. Anyone more proficient with okio can chime in to help me understand? 😊jmfayard
08/10/2022, 5:15 PMapollo-kotliin
for the first time
Following the tutorial works fine. until this step, any idea what I'm doing that's stupid?
https://github.com/jmfayard/my-kotlin-scipts/commit/424c8222458f9bf320e76eab84479e0a1397e7e9 (edited)Stylianos Gakis
08/22/2022, 1:25 PMagrosner
08/22/2022, 2:24 PMNo matching variant of project :infra-apollo-schema was found. The consumer was configured to find a usage of 'apollo-metadata' of a component, as well as attribute 'com.apollographql.service' with value 'monolith' but:
- Variant 'apolloStorefrontProducer' capability :infra-apollo-schema:1.0.0 declares a usage of 'apollo-metadata' of a component:
- Incompatible because this component declares a component, as well as attribute 'com.apollographql.service' with value 'storefront' and the consumer needed a component, as well as attribute 'com.apollographql.service' with value 'monolith'
Stylianos Gakis
08/22/2022, 8:57 PMwatch()
for some query and how I’d handle error cases within it, more in thread 🧵Stylianos Gakis
08/22/2022, 8:57 PMwatch()
for some query and how I’d handle error cases within it, more in thread 🧵.watch()
on a Query in order to update the UI.
This came with the problem where if there is no internet, and nothing is cached, and I did not pass fetchThrows = true
, the watch would simply not return anything and since no value would even come it’d be stuck loading and no information on the no internet access error would surface on the UI.
Then I thought of adding fetchThrows = true
to error on the first fetch if it fails (and not refetchThrows = true
since at that point I can rely on the cache) so that I show the error screen to help them understand that something went wrong instead of showing an infinite loading screen. Now this comes with the problem that since the watch threw, the flow is cancelled and I’d then need something to re-start this watch on a retry button click or something like that.
But then I need some functionality to do this retrying the watch from start again, which is what I’ve done now and it works. But I’m thinking, am I missing something better I could be doing here with the .watch APIs? Something I’m misusing by some chance?bod
08/23/2022, 8:50 AMwatch
? The one that takes a D?
and a retryWhen
lambdaApolloResponse
which would simplify this usecase - more info in this issue)Stylianos Gakis
08/29/2022, 7:39 AMwatch
signature since I don’t think I quite get it tbh.
I guess how it’d work is that instead I’d do a normal query, get that result and do what I want with the error case, and in case of a successful response I then take that data and feed it into the .watch
data
parameter?
I read that issue and yeah sounds interesting to see what approach you’ll go with after all. I’ll keep an eye on it to make sure I am up to date with this decision 😅