class GraphQL::UnauthorizedError

Attributes

context[R]

@return [GraphQL::Query::Context] the context for the current query

object[R]

@return [Object] the application object that failed the authorization check

type[R]

@return [Class] the GraphQL object type whose `.authorized?` method was called (and returned false)

Public Class Methods

new(object:, type:, context:) click to toggle source
Calls superclass method
# File lib/graphql/unauthorized_error.rb, line 12
def initialize(object,, type,, context))
  @object = object
  @type = type
  @context = context
  super("An instance of #{object.class} failed #{type.name}'s authorization check")
end