Class: GraphQL::Rails::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/graphql/rails/engine.rb

Instance Method Summary collapse

Instance Method Details

#reload!Object

Clear state and load operations from the Rails app.



61
62
63
64
65
66
67
68
69
# File 'lib/graphql/rails/engine.rb', line 61

def reload!
  Types.clear
  Schema.clear
  Rails.logger.debug 'Loading operations'
  Dir[@graph_path.join('operations', '**', '*.rb')].each do |file|
    Rails.logger.debug "Loading file: #{file}"
    require_dependency file
  end
end