Skip to content

Automatically handle enums #253

@stuebingerb

Description

@stuebingerb

Currently, the following schema definition fails with
SchemaException: Cannot handle enum class class com.apurebase.kgraphql.FilmType as Object type :

schema {
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}

To make it work, one has to manually register the enum via DSL:

schema {
    enum<FilmType>()
    query("getEnum") {
        resolver { -> FilmType.FULL_LENGTH }
    }
}

It should be possible to get rid of that manual step and handle enums automatically.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions