Add a rule to enforce resolver type annotations
All threads resolved!
All threads resolved!
Compare changes
Files
4- Alex Kalderimis authored
This new rubocop rule enforces that all resolvers declare their type. This is important for several reasons: - developers can read a resolver and know what it does, by understanding what it is meant to return. - we can enable better testing of resolvers, by creating fields from resolvers using `Resolver.field_options`. - Resolvers become the SSOT for field metadata, enabling us to eliminate repetition and boilerplate.
rubocop/cop/graphql/resolver_type.rb
0 → 100644
+ 59
− 0