lib/graphql/execution/execute.rb in graphql-1.9.4 vs lib/graphql/execution/execute.rb in graphql-1.9.5

- old
+ new

@@ -126,9 +126,12 @@ begin arguments = query.arguments_for(irep_node, field) field_ctx.trace("execute_field", { context: field_ctx }) do field_ctx.schema.middleware.invoke([parent_type, object, field, arguments, field_ctx]) end + rescue GraphQL::UnauthorizedFieldError => err + err.field ||= field + field_ctx.schema.unauthorized_field(err) rescue GraphQL::UnauthorizedError => err field_ctx.schema.unauthorized_object(err) end rescue GraphQL::ExecutionError => err err