Class: GraphQL::StaticValidation::ValidationTimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/graphql/static_validation/validation_timeout_error.rb

Instance Attribute Summary

Attributes inherited from Error

#message, #nodes, #path

Instance Method Summary collapse

Constructor Details

#initialize(message, path: nil, nodes: []) ⇒ ValidationTimeoutError

Returns a new instance of ValidationTimeoutError.



5
6
7
# File 'lib/graphql/static_validation/validation_timeout_error.rb', line 5

def initialize(message, path: nil, nodes: [])
  super(message, path: path, nodes: nodes)
end

Instance Method Details

#codeObject



20
21
22
# File 'lib/graphql/static_validation/validation_timeout_error.rb', line 20

def code
  "validationTimeout"
end

#to_hObject

A hash representation of this Message



10
11
12
13
14
15
16
17
18
# File 'lib/graphql/static_validation/validation_timeout_error.rb', line 10

def to_h
  extensions = {
    "code" => code
  }

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