I have an interface and an implementation like thi...
# graphql-kotlin
s
I have an interface and an implementation like this
Copy code
interface ExerciseModel {
    val uuid: String
    val title: String
    val category: ExerciseCategory //this is an enum class
    val duration: Int

    suspend fun user(): DataFetcherResult<UserModel>
}

class ExerciseModelImpl(
    override val uuid: String,
    override val title: String,
    override val category: ExerciseCategory,
    override val duration: Int,
    private val userId: String,
) : ExerciseModel {
    override suspend fun user() : DataFetcherResult<UserModel> = UserService().getUser(userId.toUUID).respond()
}
and a few queries returning
ExerciseModel
why does it say
Cannot convert com.example.graphql.schema.models.ExerciseModel since it is not a valid GraphQL type or outside the supported packages "[com/example]"
? (version:
7.0.0-alpha.5
)
ah well, didn't pay attention to com.example vs com/example
however with version 6.x it doesn't seem to matter