Jabez Magomere
09/29/2020, 9:38 AMVitaliy Kondratiev
11/20/2020, 1:05 AMAleksandr Ivanov
11/25/2020, 9:25 AMmutation offlineSync {
s1: createDeliveryShift(input: {
id: "71ea006c-2a4d-476a-9bcc-78c43baa7bb7"
data: {
id: "71ea006c-2a4d-476a-9bcc-78c43baa7bb7"
}
registeredAt: "2020-11-05T14:11:00.000Z"
}) {
id
}
s2: startDeliveryShift(input: {
id: "2cd03c01-c684-41f1-b1a0-aac285b29ba7"
data: {
id: "71ea006c-2a4d-476a-9bcc-78c43baa7bb7"
startedAt: "2020-11-05T14:11:00.000Z"
}
registeredAt: "2020-11-05T14:11:00.000Z"
}) {
id
}
}
amount of mutation is dynamic. in the example there is only two mutations s1,s2, but amount and type of mutations could be different. Is it possible to do that wit apollo client library?wasyl
11/26/2020, 10:15 PMAttila Blenesi
12/09/2020, 12:10 AMdownloadApolloSchema
task in kts for a multi module project, without success.
apollo {
generateKotlinModels.set(true)
customTypeMapping.set(mapOf("Date" to "me.sphere.appcore.utils.EpochSeconds"))
service("Service") {
sourceFolder.set("commonMain")
schemaPath.set("com/example/schema.json")
introspection {
endpointUrl.set("<https://api.example.com/graphql>")
sourceSetName.set("commonMain") <-- This is same as sourceFolder? Do we need to declare it 2x
}
}
}
I'm getting:
Execution failed for task ':appcore-apollo:downloadApolloSchema'.
> ApolloGraphQL: cannot determine where to save the schema. Specify --schema or --service
In an Android project specifying only schemaPath
, introspection with endpointUrl
works without any issues.Oleksii Yerastov
12/09/2020, 8:55 AMenum
value from API and leads to error response?
As I can see apollo generates safeValueOf(rawValue: String)
method in enum class alongside with
/**
* Auto generated constant for unknown enum values
*/
UNKNOWN__("UNKNOWN__");
value for unknown enums. Also there is usage of this method in operator fun invoke(reader: ResponseReader)
for entity that contains this enum.
Do I need to explicitly enable something to make this work so I apollo can parse unknown enum values to UNKNOWN?wasyl
12/11/2020, 5:13 PMcache_only
fetch strategy, namely our Flow with that strategy fails with a network exception. Is it possible that a query with cache_only fetch strategy makes, or triggers (by refetching some previous query), a network call?wasyl
12/15/2020, 6:43 PMCacheKeyResolver
and fromFieldRecordSet
and fromFieldArguments
methods?
fromFieldRecordSet
seems like it asks for cache key for every object (non-scalar) in the response? But what does fromFieldArguments
do?wasyl
01/08/2021, 2:57 PMmaxgdn
01/12/2021, 7:40 PMam414
01/17/2021, 3:27 PMFailed to locate schema root node `__schema`
also if i put the whole json object inside these
{
"data": {
"__schema": {here}
}
}
i got another error
Required value 'types_' (JSON name 'types') missing at $.data.__schema
we solve this error in our server
but is I miss something ? or they need to update the website ?wasyl
01/26/2021, 2:14 PMwasyl
02/02/2021, 2:30 PMAleksandr Ivanov
02/10/2021, 5:55 AM> Task :drivers-app-api:compileIosMainKotlinMetadata FAILED
e: /Users/alexander.ivanov/Development/pmob-sdrv-graphql-api-tool/sources/drivers-app-api/src/iosMain/kotlin/com/arrival/adp/drivers/app/api/DictionariesApi.kt: (3, 12): Unresolved reference: apollographql
e: /Users/alexander.ivanov/Development/pmob-sdrv-graphql-api-tool/sources/drivers-app-api/src/iosMain/kotlin/com/arrival/adp/drivers/app/api/DictionariesApi.kt: (10, 2): Unresolved reference: ApolloExperimental
e: /Users/alexander.ivanov/Development/pmob-sdrv-graphql-api-tool/sources/drivers-app-api/src/iosMain/kotlin/com/arrival/adp/drivers/app/api/DriverScheduleApi.kt: (3, 12): Unresolved reference: apollographql
e: /Users/alexander.ivanov/Development/pmob-sdrv-graphql-api-tool/sources/drivers-app-api/src/iosMain/kotlin/com/arrival/adp/drivers/app/api/DriverScheduleApi.kt: (11, 2): Unresolved reference: ApolloExperimental
e: /Users/alexander.ivanov/Development/pmob-sdrv-graphql-api-tool/sources/drivers-app-api/src/iosMain/kotlin/com/arrival/adp/drivers/app/api/DriversApi.kt: (3, 12):
Any ideas of a reason for that behavior?Eduard Boloș
03/01/2021, 5:22 PMNormalizedCache#merge(com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.CacheHeaders)
(https://github.com/apollographql/apollo-android/blob/bd707bbcb14741a3d2176ae93007bc42d080d878/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo/cache/normalized/NormalizedCache.kt#L58) is not returning Set<String>
instead of Set<String?>
. Both NormalizedCache#merge(com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.CacheHeaders)
and NormalizedCache#merge(com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.CacheHeaders)
already return non-nullable String sets, I find the difference a bit annoying, and it forces me to make a cast to Set<String>
in our codebase xD Also, technically, nothing is impeding the return type to be a set of non-nullable strings. I am happy open a PR that changes the return type, if you think that it makes sense.André Thiele
03/20/2021, 4:02 PMAndré Thiele
03/21/2021, 2:52 PMNeal Sanche
03/22/2021, 10:01 PMdownloadApolloSchema
gradle target, and wasn't able to. I've configured my multiplatform project exactly as the documentation says. But where this project differs is in the top level build gradle file which has:
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
classpath("com.android.tools.build:gradle:7.0.0-alpha11")
I found that if I use android tools > 7.0.0-alpha06
I get the following error when downloading a schema through gradle:
* What went wrong:
Execution failed for task ':shared:downloadApolloSchema'.
> Companion
If I --stacktrace
that, a bit more information is present:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class okhttp3.internal.Util
at okhttp3.RequestBody$Companion.create(RequestBody.kt:145)
at okhttp3.RequestBody$Companion.create$default(RequestBody.kt:143)
at com.apollographql.apollo.gradle.internal.SchemaHelper.executeQuery$apollo_gradle_plugin(SchemaHelper.kt:39)
Which doesn't make a lot of sense. Why would things change in 7.0.0-alpha07
that would cause this sort of issue? Any ideas?Vyshas
03/23/2021, 9:31 PMclark
03/27/2021, 4:57 PMclark
04/01/2021, 3:09 AMKotlinException=kotlin.AssertionError: Assertion failed
I've seen a couple sample projects, like the one from Apollo's github, and it has an iOS specific implementation of the repository that does some work with the coroutines scope. Is that what might be causing my issue?
Anyone else using apollo client in a multiplatform project in iOS and able to successfully make queries and mutations?clark
04/01/2021, 2:10 PMSamuel Michael
04/06/2021, 2:31 AM#import "./MyFragment"
that but so far no example in an Android context.
Currently we are redefining the same huge fragments in multiple queries and would like to be able to extract all those into several separate fragment files and DRY up the main queriesEduard Boloș
04/12/2021, 10:44 AM*.graphql
files and that would raise an error if someone would try to introduce a breaking change in the GQL schema based on the information of the used fields.
If relevant, we are using Apollo-Android on the client-side, Graphene-Python on the backend, and everything is in a monorepo.andylamax
04/25/2021, 10:53 AMapollo-api
. Help pleaseSamuel Michael
04/26/2021, 3:45 PMSamuel Michael
05/01/2021, 5:09 AMDoug Chappelle
05/03/2021, 2:21 PMclark
05/04/2021, 2:06 AM.toInput()
method on each parameter I pass to an Input object type?Neal Sanche
05/04/2021, 11:40 PM