Module: Graphiti::Rails

Defined in:
lib/graphiti/rails.rb,
lib/graphiti/rails/context.rb,
lib/graphiti/rails/railtie.rb,
lib/graphiti/rails/version.rb,
lib/graphiti/rails/debugging.rb,
lib/graphiti/rails/responders.rb,
lib/graphiti/rails/test_helpers.rb,
lib/graphiti/rails/exception_handlers.rb,
lib/graphiti/rails/graphiti_errors_testing.rb

Overview

Rails integration for Graphiti. See README for more details.

Defined Under Namespace

Modules: Context, Debugging, GraphitiErrorsTesting, Responders, TestHelpers Classes: ExceptionHandler, FallbackHandler, InvalidRequestHandler, Railtie

Constant Summary collapse

DEPRECATOR =
ActiveSupport::Deprecation.new('1.0', 'graphiti-rails')
VERSION =
'0.4.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.handled_exception_formatsObject

A list of formats as symbols which will be handled by a GraphitiErrors::ExceptionHandler. See Railtie.



31
# File 'lib/graphiti/rails.rb', line 31

cattr_accessor :handled_exception_formats, default: []

.respond_to_formatsObject

A list of formats as symbols which will be available for Graphiti::Rails::Responders. See Railtie.



35
# File 'lib/graphiti/rails.rb', line 35

cattr_accessor :respond_to_formats, default: []

Class Method Details

.included(klass) ⇒ Object



23
24
25
26
27
# File 'lib/graphiti/rails.rb', line 23

def self.included(klass)
  DEPRECATOR.deprecation_warning("Including Graphiti::Rails", "See https://www.graphiti.dev/guides/graphiti-rails-migration for help migrating to the new format")
  require 'graphiti_errors'
  klass.send(:include, GraphitiErrors)
end