aPureBase / KGraphQL

Pure Kotlin GraphQL implementation
https://kgraphql.io
MIT License
301 stars 58 forks source link

Better error reporting on Void #80

Closed jeggy closed 4 years ago

jeggy commented 4 years ago

Currently if I have done some mistake and return nothing or just a TODO("Not implemented yet"). I'm getting this error:

Caused by: com.apurebase.kgraphql.schema.SchemaException: An Object type must define one or more fields. Found none on type Void

in large schemas it's really hard to figure out which resolver is causing this.

jeggy commented 4 years ago

This is also the case when returning Unit. The error should also report the field name, so it's easier to navigate the error.

jeggy commented 4 years ago

This now reports a better error and the name of the field that causes the error. Released in version 0.15.5. :+1: