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