class GraphQL::StaticValidation::FragmentsAreUsedError
Attributes
Public Class Methods
(String message, fragment: String, ?path: Array[String | Integer]?, ?nodes: GraphQL::Language::Nodes::AbstractNode | Array[GraphQL::Language::Nodes::AbstractNode]) → void
Source
# File lib/graphql/static_validation/rules/fragments_are_used_error.rb, line 11 def initialize(message, fragment:, path: nil, nodes: []) super(message, path: path, nodes: nodes) @fragment_name = fragment #: String end
Calls superclass method
GraphQL::StaticValidation::Error::new
Public Instance Methods
# File lib/graphql/static_validation/rules/fragments_are_used_error.rb, line 30 def code "useAndDefineFragment" end
# File lib/graphql/static_validation/rules/fragments_are_used_error.rb, line 18 def to_h extensions = { "code" => code, "fragmentName" => fragment_name } super.merge({ "extensions" => extensions }) end
A hash representation of this Message
Calls superclass method
GraphQL::StaticValidation::Error#to_h