code: public function assertValid()
      {
          parent::assertValid();
  
          Utils::invariant(
              ! empty($this->getFields()),
              sprintf(
                  '%s fields must be an associative array with field names as keys or a callable which returns such an array.',
                  $this->name
              )
          );
  
          foreach ($this->getFields() as $field) {
              $field->assertValid($this);
          }
      }
docs: Validates type config and throws if one of type options is invalid.
  Note: this method is shallow, it won't validate object fields and their arguments.
  
  @throws InvariantViolation