code: public static function getRule($name)
      {
          $rules = static::allRules();
  
          if (isset($rules[$name])) {
              return $rules[$name];
          }
  
          $name = sprintf('GraphQL\\Validator\\Rules\\%s', $name);
  
          return $rules[$name] ?? null;
      }
docs: Returns global validation rule by name. Standard rules are named by class name, so
  example usage for such rules:
  
  $rule = DocumentValidator::getRule(GraphQL\Validator\Rules\QueryComplexity::class);
  
  @param string $name
  
  @return ValidationRule
  
  @api