Closed ryanmaxwell closed 5 years ago
are you kidding me, literally a minute after I file this bug you've bumped the version with this in it 😲
PR #19 does indeed solve this. :) Let me know if something is still missing, I'll close the issue for now. ;)
@Calcyfer sorry but i've tried out 0.17.2 and it's not inheriting the fields from an interface 🤔
basic example, the following typedefs are both prior and following compilation
interface Animal {
name: String!
}
type Fish implements Animal {
swimmingSpeed: Float
}
type Bird implements Animal {
wingSpan: Float
}
@ryanmaxwell Try it like this :
interface Animal {
name: String!
}
type Fish implements Animal inherits Animal {
swimmingSpeed: Float
}
type Bird implements Animal inherits Animal {
wingSpan: Float
}
ah ok so it's an opt-in by using the inherits
keyword. Fair enough. Thanks and yes that does work!
Indeed. Happy to hear it works! :)
Hi,
I think it's great that if you use the
inherits
keyword, your subtype doesn't have to redeclare the fields that are already declared in the parent type.It would be great if the compiler also did the same for interfaces. Currently the child types have to redeclare all the fields from an interface on all the implementing types. It's a lot of tedious boilerplate and this project would be perfect to remove it.
cheers