Method: GraphQL::ParseError#to_h

Defined in:
lib/graphql/parse_error.rb

#to_hObject



16
17
18
19
20
21
22
# File 'lib/graphql/parse_error.rb', line 16

def to_h
  locations = line ? [{ "line" => line, "column" => col }] : []
  {
    "message" => message,
    "locations" => locations,
  }
end