Skip to content

Provide better errors for KType errors #155

Open
@jeggy

Description

@jeggy

Here's an example error of when using a Exposed class: Exception in thread "main" com.apurebase.kgraphql.schema.SchemaException: Generic types are not supported by GraphQL, found kotlin.collections.Map<org.jetbrains.exposed.sql.Expression<*>, kotlin.Int> thrown from SchemaCompilation.kt:168

Instead of throwing this error, it would be great to provide a error message which recursively provides full information of exactly where this issue is coming from.

In a Exposed sample, the reason would be because of the type is extending the Entity<Int> type, and a field on this class is ResultRow and it's here the field fieldIndex of the type Map<Expression<*>, Int> lies, which is causing this to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions