Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to implement an interface into another interface #132

Open
berserkore opened this issue Feb 17, 2021 · 0 comments
Open

Ability to implement an interface into another interface #132

berserkore opened this issue Feb 17, 2021 · 0 comments

Comments

@berserkore
Copy link

berserkore commented Feb 17, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant