Skip to content

Files

Latest commit

 

History

History
36 lines (26 loc) · 864 Bytes

GraphQL-ResolverMethodLength.md

File metadata and controls

36 lines (26 loc) · 864 Bytes

Pattern: Resolver method has too many lines

Issue: -

Description

Checks if the length of a resolver method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable using the Max option.

Examples

# good
class UserType < BaseType
  field :name, String, null: true
  field :phone, String, null: true do
    argument :something, String, required: false
  end
end

# good
class UserType < BaseType
  field :phone, String, null: true

  field :name, String, null: true
end

# bad
class UserType < BaseType
  field :phone, String, null: true
  field :name, String, null: true
end

Further Reading