lib/rails/graphql/type_map.rb
# Reset the state of the type mapper
Reset the state of the type mapper
Reset the state of the type mapper
def reset!
        @objects = 0 
        @pending = []
        @callbacks = Hash.new { |h, k| h[k] = [] }
        @skip_register = nil
        @index = Concurrent::Map.new do |h1, key1|                
          base_class = Concurrent::Map.new do |h2, key2|          
            ensure_base_class!(key2)
            h2.fetch_or_store(key2, Concurrent::Map.new)          
          end
          h1.fetch_or_store(key1, base_class)
        end
        @checkpoint.map(&:register!) if defined?(@checkpoint)
      end
def reset! @objects = 0 @pending = [ ] @callbacks = Hash . new { | h , k | h [ k ] = [ ] } @skip_register = nil @index = Concurrent :: Map . new do | h1 , key1 | base_class = Concurrent :: Map . new do | h2 , key2 | ensure_base_class! ( key2 ) h2 . fetch_or_store ( key2 , Concurrent :: Map . new ) end h1 . fetch_or_store ( key1 , base_class ) end @checkpoint . map ( & :register! ) if defined? ( @checkpoint ) end
Reset the state of the type mapper
Reset the state of the type mapper
# Number of types and directives defined # Namespaces # Base classes # Items