apollographql / apollo-kotlin-tutorial Goto Github PK
View Code? Open in Web Editor NEWThe code for the Apollo Kotlin Tutorial
License: MIT License
The code for the Apollo Kotlin Tutorial
License: MIT License
Following the tutorial here: https://www.apollographql.com/docs/kotlin/tutorial/01-configure-project
At the end of step 1 it says:
Android Studio will display a yellow banner, A project sync may be necessary for the IDE to work properly. Click Sync Now.
If everything goes well, Apollo Kotlin is now added to your project. Next, you will add the GraphQL schema to the project.
Clicks Sync Now
However you get the error
No schema file found in:
src/main/graphql
Which seems to be step 2 of the tutorial. Just a heads up.
After completing step 2 (i.e. running the command ./gradlew :app:downloadApolloSchema --endpoint='https://apollo-fullstack-tutorial.herokuapp.com/graphql' --schema=app/src/main/graphql/schema.graphqls
), the project sync's successfully.
Getting The below issue when response is being converted to data class by apollo:
fromJson(com.apollographql.apollo3.api.json.JsonReader, com.apollographql.apollo3.api.CustomScalarAdapters) failed to verify:ArrayList[data]
at com.nw18.data.repository.ILanguageTranslationRepositoryImpl$getLanguageTranslationData$2.invokeSuspend(ILanguageTranslationRepositoryImpl.kt:26)
at com.nw18.data.repository.ILanguageTranslationRepositoryImpl$getLanguageTranslationData$2.invoke(Unknown Source:8)
at com.nw18.data.repository.ILanguageTranslationRepositoryImpl$getLanguageTranslationData$2.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(ChannelFlow.kt:167)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect(Unknown Source:0)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invokeSuspend(Merge.kt:27)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Unknown Source:8)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest.flowCollect(Merge.kt:25)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(Unknown Source:0)
at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@317f5d6, Dispatchers.IO]
Hi! I've been trying to get the tutorial setup for several hours now between yesterday and today. I cloned and followed the initial steps located on here: https://www.apollographql.com/docs/kotlin/tutorial/01-configure-project#clone-the-starter-project
Right away I was getting this error:
I'm getting this error even on the 'main' branch which is supposed to be the "final" and completed project according to the tutorial. I think something may be outdated. I've tried several different methods of "setting up" Kotlin plugins and extensions found on the Kotlin docs, Android docs, and stack overflow, but none fixed this issue for me.
The repo for Add GraphQL to Your Jetpack Compose Apps doesn't exist, please check
https://github.com/apollographql/apollo-kotlin-tutorial/tree/compose
Make the tutorial use Jetpack Compose by default (keep the view based version as a separate branch).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.