Attila 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.mbonnin
12/09/2020, 9:58 AMdownloadApolloSchema
is meant to be used from the commandline. Can you try downloadSphereApolloSchema
?Attila Blenesi
12/09/2020, 10:56 AMmbonnin
12/09/2020, 10:58 AMsourceSetName.set("commonMain")
I "think" this is not needed for multiplatform. This is needed for Android projects where we create a compilationUnit per android variant and it can potentially have different schemas per-variantmbonnin
12/09/2020, 10:59 AM