Exception: GraphQL::Authorization::InaccessibleFieldsError
- Inherits:
-
GraphQL::AnalysisError
- Object
- StandardError
- Error
- ExecutionError
- GraphQL::AnalysisError
- GraphQL::Authorization::InaccessibleFieldsError
- Defined in:
- lib/graphql/authorization.rb
Instance Attribute Summary collapse
-
#context ⇒ GraphQL::Query::Context
readonly
The current query's context.
-
#fields ⇒ Array<Schema::Field, GraphQL::Field>
readonly
Fields that failed
.accessible?
checks. -
#irep_nodes ⇒ Array<GraphQL::InternalRepresentation::Node>
readonly
The visited nodes that failed
.accessible?
checks.
Attributes inherited from ExecutionError
#ast_node, #extensions, #options, #path
Instance Method Summary collapse
-
#initialize(fields:, irep_nodes:, context:) ⇒ InaccessibleFieldsError
constructor
A new instance of InaccessibleFieldsError.
Methods inherited from ExecutionError
Constructor Details
#initialize(fields:, irep_nodes:, context:) ⇒ InaccessibleFieldsError
Returns a new instance of InaccessibleFieldsError.
15 16 17 18 19 20 |
# File 'lib/graphql/authorization.rb', line 15 def initialize(fields:, irep_nodes:, context:) @fields = fields @irep_nodes = irep_nodes @context = context super("Some fields in this query are not accessible: #{fields.map(&:graphql_name).join(", ")}") end |
Instance Attribute Details
#context ⇒ GraphQL::Query::Context (readonly)
Returns The current query's context.
9 10 11 |
# File 'lib/graphql/authorization.rb', line 9 def context @context end |
#fields ⇒ Array<Schema::Field, GraphQL::Field> (readonly)
Returns Fields that failed .accessible?
checks.
6 7 8 |
# File 'lib/graphql/authorization.rb', line 6 def fields @fields end |
#irep_nodes ⇒ Array<GraphQL::InternalRepresentation::Node> (readonly)
Returns The visited nodes that failed .accessible?
checks.
13 14 15 |
# File 'lib/graphql/authorization.rb', line 13 def irep_nodes @irep_nodes end |