lib/osso/graphql/schema.rb in osso-0.0.3.6 vs lib/osso/graphql/schema.rb in osso-0.0.3.7
- old
+ new
@@ -35,8 +35,12 @@
Types::IdentityProvider
else
raise("Unexpected object: #{obj}")
end
end
+
+ def self.unauthorized_object(error)
+ raise ::GraphQL::ExecutionError, "An object of type #{error.type.graphql_name} was hidden due to permissions"
+ end
end
end
end