Please, is it possible to somehow "hide" any types when generating GraphQL schema? I am using Jetbrains Exposed library to ORM mapping, I have DAO object and entity class (having functions like
.wrapRow
etc..
object TableObject : IdTable<Int>("tableName") {
val property1 = long("column1")
val property2 = long("column2")
}
class MappedEntity(id: EntityID<Int>): Entity<Int>(id){
companion object : EntityClass<Int, MappedEntity>(TableObject)
var entityProperty1 by TableObject.property1
var entityProperty2 by TableObject.property2
}
I want to return
MappedEntity
in GraphQL schema, but there is problem with
com.expediagroup.graphql.exceptions.TypeNotSupportedException: Cannot convert org.jetbrains.exposed.sql.ResultRow? since it is not a valid GraphQL type or outside the supported packages
.
Do I need to map this entity to another class, or is there way to use MappedEntity class in GraphQL schema?