Skip to content

Files

Latest commit

 

History

History
32 lines (24 loc) · 729 Bytes

GraphQL-FieldUniqueness.md

File metadata and controls

32 lines (24 loc) · 729 Bytes

Pattern: Duplicate field definition within the same type

Issue: -

Description

Detects duplicate field definitions within the same type.

Examples

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

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

Further Reading