Sha256: 6db83f1e5a24edd135bb1bd67917a525b7e4f3c6ba4eb1c804620a6e32c5e329
Contents?: true
Size: 509 Bytes
Versions: 137
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true module GraphQL class ParseError < GraphQL::Error attr_reader :line, :col, :query def initialize(message, line, col, query, filename: nil) if filename message += " (#{filename})" end super(message) @line = line @col = col @query = query end def to_h locations = line ? [{ "line" => line, "column" => col }] : [] { "message" => message, "locations" => locations, } end end end
Version data entries
137 entries across 137 versions & 2 rubygems