Method: GraphQL::StaticValidation::FieldsHaveAppropriateSelectionsError#to_h

Defined in:
lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb

#to_hObject

A hash representation of this Message



15
16
17
18
19
20
21
22
23
24
# File 'lib/graphql/static_validation/rules/fields_have_appropriate_selections_error.rb', line 15

def to_h
  extensions = {
    "code" => code,
    "nodeName" => node_name
  }.tap { |h| h["typeName"] = type_name unless type_name.nil? }

  super.merge({
    "extensions" => extensions
  })
end