Class: Ibrain::Extentions::AuthorizeRequired
- Inherits:
-
GraphQL::Schema::FieldExtension
- Object
- GraphQL::Schema::FieldExtension
- Ibrain::Extentions::AuthorizeRequired
- Defined in:
- app/graphql/ibrain/extentions/authorize_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/authorize_required.rb', line 6 def resolve(object:, arguments:, **rest) raise IbrainErrors::PermissionError.new("You not have permission to access #{field&.name}") unless (object) # yield the current time as `memo` yield(object, arguments, rest) end |