Class: GraphQL::Language::Nodes::AbstractNode

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/language/nodes/deep_freeze_ext.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#deep_freezeObject

Public: Freeze entire Node tree

Returns self Node.



12
13
14
15
16
17
18
# File 'lib/graphql/language/nodes/deep_freeze_ext.rb', line 12

def deep_freeze
  scalars # load internal state
  children.each(&:deep_freeze)
  scalars.each { |s| s && s.freeze }
  freeze
  self
end