You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now an exception is thrown with lists of polymorphic types before fun willGenerateGraphQLType(type: KType): GraphQLType? since #801. My suggestion is to allow users to handle this situation with custom Coercing implementation and throw if no custom scalar type were provided. It is possible already but only with a hack:
overridefunwillResolveInputMonad(type:KType): KType {
returnwhen { // MessageContent is sealed class, but MessageContentInput is data class and actually does nothing
type == typeOf<List<MessageContent>>() -> typeOf<List<MessageContentInput>>()
else->super.willResolveInputMonad(type)
}
}
overridefunwillGenerateGraphQLType(type:KType): GraphQLType?=when (type.classifier) {
MessageContentInput::class->MessageContentScalar// uses Coercing<MessageContent, String>else->null
}
The text was updated successfully, but these errors were encountered:
Right now an exception is thrown with lists of polymorphic types before
fun willGenerateGraphQLType(type: KType): GraphQLType?
since #801. My suggestion is to allow users to handle this situation with customCoercing
implementation and throw if no custom scalar type were provided. It is possible already but only with a hack:The text was updated successfully, but these errors were encountered: