Make resolvers inherit description from superclass#5195
Conversation
| include Schema::Member::GraphQLTypeNames | ||
| # Really we only need description & comment from here, but: | ||
| extend Schema::Member::BaseDSLMethods | ||
| extend Member::BaseDSLMethods::ConfigurationExtension |
There was a problem hiding this comment.
There's a side-effect from this change where resolvers that inherit from other resolvers must now explicitly declare a typename, otherwise they inherit the parent's typename and become a duplicate definition name.
Was this intentional? It's a bit counter-intuitive to the default precedent of elements following their class names.
There was a problem hiding this comment.
No, that was an accident. I've proposed a fix here: #5260
There was a problem hiding this comment.
FWIW, @swalkinshaw and I talked about the new behavior and agreed that it isn’t all bad. A resolver is effectively a representation of a Type, and type inheritance is generally discouraged in favor of sharing behavior through mixins. That’s internal precedent though. The former behavior is probably more consistent with the general library.
Oops -- I think this was just an oversight that
descriptionwasn't passed down to children.