Class: GraphQL::StaticValidation::ArgumentNamesAreUniqueError
- Inherits:
-
StaticValidation::Error
- Object
- StaticValidation::Error
- GraphQL::StaticValidation::ArgumentNamesAreUniqueError
- Defined in:
- lib/graphql/static_validation/rules/argument_names_are_unique_error.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#code ⇒ Object
: -> String.
-
#initialize(message, name:, path: nil, nodes: []) ⇒ ArgumentNamesAreUniqueError
constructor
: (String message, name: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array) -> void.
-
#to_h ⇒ Object
A hash representation of this Message : -> Hash[String, untyped].
Constructor Details
#initialize(message, name:, path: nil, nodes: []) ⇒ ArgumentNamesAreUniqueError
: (String message, name: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array) -> void
11 12 13 14 |
# File 'lib/graphql/static_validation/rules/argument_names_are_unique_error.rb', line 11 def initialize(, name:, path: nil, nodes: []) super(, path: path, nodes: nodes) @name = name #: String end |
Instance Attribute Details
#name ⇒ Object (readonly)
: String
8 9 10 |
# File 'lib/graphql/static_validation/rules/argument_names_are_unique_error.rb', line 8 def name @name end |
Instance Method Details
#code ⇒ Object
: -> String
30 31 32 |
# File 'lib/graphql/static_validation/rules/argument_names_are_unique_error.rb', line 30 def code "argumentNotUnique" end |
#to_h ⇒ Object
A hash representation of this Message : -> Hash[String, untyped]
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/graphql/static_validation/rules/argument_names_are_unique_error.rb', line 18 def to_h extensions = { "code" => code, "name" => name } super.merge({ "extensions" => extensions }) end |