Class: Ibrain::Extentions::ActiveRequired
- Inherits:
-
GraphQL::Schema::FieldExtension
- Object
- GraphQL::Schema::FieldExtension
- Ibrain::Extentions::ActiveRequired
- Defined in:
- app/graphql/ibrain/extentions/active_required.rb
Instance Method Summary collapse
Instance Method Details
#resolve(object:, arguments:, **rest) {|object, arguments, rest| ... } ⇒ Object
6 7 8 9 10 11 |
# File 'app/graphql/ibrain/extentions/active_required.rb', line 6 def resolve(object:, arguments:, **rest) raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.session.is_deactivated') unless is_activated(object) # yield the current time as `memo` yield(object, arguments, rest) end |