Open phated opened 5 years ago
This is a known limitation, but unfortunately not documented 😞Whether an object correctly implements an interface is one of the things that cannot be captured in the type system. My current plan is to "just" implement it as an exception raising runtime check when calling Schema.add_type
. Although inferior to a type error, I think it's a reasonable trade-off to have an exception at schema-construction time to be exception-free at query-execution time.
Here's the TODO
in the source code:
I'm happy to accept contributions, even if it's just a note in the README
😀
I have a schema similar to:
But there are no errors produced unless I try to access the
id
field in a query. So this query actually succeeds: