class GraphQL::Schema::Directive::Locale

Attributes

locale_enum[RW]

Public Class Methods

resolve(_object, argument, _context) { || ... } click to toggle source
# File lib/graphql/schema/directive/locale.rb, line 19
def self.resolve(_object, argument, _context)
  I18n.with_locale(argument[:lang]) do
    yield
  end
end