Exception: GraphQL::InvalidNameError

Inherits:
ExecutionError show all
Defined in:
lib/graphql/invalid_name_error.rb

Instance Attribute Summary collapse

Attributes inherited from ExecutionError

#ast_node, #extensions, #options, #path

Instance Method Summary collapse

Methods inherited from ExecutionError

#to_h

Constructor Details

#initialize(name, valid_regex) ⇒ InvalidNameError

Returns a new instance of InvalidNameError



5
6
7
8
9
# File 'lib/graphql/invalid_name_error.rb', line 5

def initialize(name, valid_regex)
  @name = name
  @valid_regex = valid_regex
  super("Names must match #{@valid_regex.inspect} but '#{@name}' does not")
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name



4
5
6
# File 'lib/graphql/invalid_name_error.rb', line 4

def name
  @name
end

#valid_regexObject (readonly)

Returns the value of attribute valid_regex



4
5
6
# File 'lib/graphql/invalid_name_error.rb', line 4

def valid_regex
  @valid_regex
end