Class: GraphQL::StaticValidation::FragmentTypesExistError
- Inherits:
-
StaticValidation::Error
- Object
- StaticValidation::Error
- GraphQL::StaticValidation::FragmentTypesExistError
- Defined in:
- lib/graphql/static_validation/rules/fragment_types_exist_error.rb
Instance Attribute Summary collapse
-
#type_name ⇒ Object
readonly
: String.
Instance Method Summary collapse
-
#code ⇒ Object
: -> String.
-
#initialize(message, type:, path: nil, nodes: []) ⇒ FragmentTypesExistError
constructor
: (String message, type: 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, type:, path: nil, nodes: []) ⇒ FragmentTypesExistError
: (String message, type: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array) -> void
11 12 13 14 |
# File 'lib/graphql/static_validation/rules/fragment_types_exist_error.rb', line 11 def initialize(, type:, path: nil, nodes: []) super(, path: path, nodes: nodes) @type_name = type #: String end |
Instance Attribute Details
#type_name ⇒ Object (readonly)
: String
8 9 10 |
# File 'lib/graphql/static_validation/rules/fragment_types_exist_error.rb', line 8 def type_name @type_name end |
Instance Method Details
#code ⇒ Object
: -> String
30 31 32 |
# File 'lib/graphql/static_validation/rules/fragment_types_exist_error.rb', line 30 def code "undefinedType" 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/fragment_types_exist_error.rb', line 18 def to_h extensions = { "code" => code, "typeName" => type_name } super.merge({ "extensions" => extensions }) end |