-
Notifications
You must be signed in to change notification settings - Fork 226
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
Support interface to implement other interface #567
Comments
Someone has to take to time to open a new PR (can be based on #389) starting from the last version. |
Hey @milliondreams we're limited in our contributors right now, but generally speaking, we absolutely would like to keep up with the spec. I suspect #389 may be old enough that a rebase / merge would be difficult, though we'd welcome a fresh PR. Additionally, I agree with @OlegIlyenko's review that the original PR got a bit unwieldy to review. Anything that can be done to make the change more targeted would be welcomed greatly. |
Is there someone already working on that one? Else I would take a look at the old PR and continue from there and see whether I can put together a PR. |
I'm not aware of anyone working on that. |
I have a question regarding how things are handled in Sangria. In my opinion (and with just copying lot of the examples from the GraphQL JS reference implementation), the following should probably cover most cases. But how do you handle things like the last two situations where in my opinion, the specification right now is not (yet) clear: interface Being {
name(surname: Boolean): String
}
interface Mammal {
mother: Mammal
father: Mammal
}
interface Pet implements Being {
name(surname: Boolean): String
}
interface Canine implements Mammal & Being {
name(surname: Boolean): String
mother: Canine
father: Canine
}
type Dog implements Being & Pet & Mammal & Canine {
name(surname: Boolean): String
nickname: String
mother: Dog
father: Dog
}
interface Bar {
one: Int
four(argument: String = "string"): String
}
interface Two {
two(argument: String!): Int
}
extend interface Bar implements Two {
two(argument: String!): Int
}
"""
Invalid (already there but as of today, the Spec is not clear about this...)
"""
extend interface Bar implements Two {
three(argument: InputType!): Type
}
"""
Probably Invalid because it's missing Mammal
"""
interface BigCanine implements Canine & Being {
mother: Being # probably invalid
father: BigCanine
} |
@titaniumcoder I don't know. Maybe you could ask on graphql/graphql-spec#373 ? |
@titaniumcoder are you working on the PR? |
@yanns nope, we didn't need it the feature in the end, should have mentioned it, sorry. |
Instead of opening an old issue (#388 & #389) which was closed since GraphQL spec in 2018 didn't support this feature #388 (comment) creating a new issue to start the discussion.
GraphQL Spec now allows (since Jan 2020) interface to implement other interfaces as documented here -
http://spec.graphql.org/draft/#sec-Interfaces.Interfaces-Implementing-Interfaces
This was merged in the spec by this PR - graphql/graphql-spec#373
and in reference JS implementation by this - graphql/graphql-js#778
Would like to know what contributors' thoughts are wrt to supporting this in Sangria. Do we review #389 or the code has changed enough to warrant a new implementation?
The text was updated successfully, but these errors were encountered: