forked from pgutkowski/KGraphQL
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice to be able to define interface properties that are not actually part of the Kotlin interface.
Idea being something like this:
interface MyInterface
data class MyDataClass(val id: Int): MyInterface
...
interface<MyInterface> {
property<String>("field1") // No default implementation and will run into runtime schema creation error if not implement in all types that implement this interface
property<String>("field2") { // This property has a default implementation, but can be overwritten within implemented types
resolver { a: MyInterface ->
"FIELD-2"
}
}
}
type<MyDataClass> {
property<String>("field1") {
resolver { data: MyDataClass ->
"FIELD-${data.id}"
}
}
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request