Exception: GraphQL::Schema::DuplicateNamesError

Inherits:
Error
  • Object
show all
Defined in:
lib/graphql/schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(duplicated_name:, duplicated_definition_1:, duplicated_definition_2:) ⇒ DuplicateNamesError

Returns a new instance of DuplicateNamesError.



80
81
82
83
84
85
# File 'lib/graphql/schema.rb', line 80

def initialize(duplicated_name:, duplicated_definition_1:, duplicated_definition_2:)
  @duplicated_name = duplicated_name
  super(
    "Found two visible definitions for `#{duplicated_name}`: #{duplicated_definition_1}, #{duplicated_definition_2}"
  )
end

Instance Attribute Details

#duplicated_nameObject (readonly)

Returns the value of attribute duplicated_name.



79
80
81
# File 'lib/graphql/schema.rb', line 79

def duplicated_name
  @duplicated_name
end