Skip to content

Ability to implement an interface into another interface #132

Open
@berserkore

Description

@berserkore

Thanks for this great library,
GraphQL spec has now support for implementing an interface into another interface.
Looks like KGraphQL already support this feature, I was able to successfully retrieve the child interface using the spread operator. However, the introspection schema does not show the implementation within the interface and highlight it as an error.

Take the following example:

interface A {
   val prop1: String
 }
 interface B: A {
    override val prop1: String
    val prop2: String
 }

Implements does not show because schema does not explicitly tell it and result to the following introspection:
Screen Shot 2021-02-18 at 1 28 46 am

However it works with a "data class":

interface A {
   val prop1: String
}
data class B (
    override val prop1: String,
    val prop2: String
): A

Screen Shot 2021-02-18 at 1 31 03 am

Here is another reference: graphql/graphql-spec#373

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions