apollographql / apollo-kotlin-tutorial

The code for the Apollo Kotlin Tutorial
MIT License
53 stars 44 forks source link

Scalar Verifier isssue #54

Open shamivulr-logituit opened 5 months ago

shamivulr-logituit commented 5 months ago

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]
martinbonnin commented 5 months ago

Hi 👋 Thanks for reaching out.

This doesn't ring a bell unfortunately. Can you share your scalar adapter implementation?