How to work with the new relations syntax?

The content manager in Strapi 4.5.0 started using new syntax for relation attributes taking this form:

relation_attribute: { 
  connect: [<ids to attach>],
  disconnect: [<ids to detach>]

It propagates through lifecycles. Unfortunately, this new syntax is procedural and its results are not known until the update is persisted. This wasn’t the case with the other forms (bare id or object) which were declarative and hence even the before* hooks had access to the result.

Does Strapi expose any helpers, that would help with resolving the expected result of the update? I’m looking for something like resolveRelations() in this example:

  async beforeUpdate(event) {
    const current = await strapi.entityService.findOne(UID,, { populate: ["attribute"] });
    // The new syntax object.
    const attributeData =
    // Get Ids that will be attached to the 'attribute' field after this update completes.
    const newAttributeIds = resolveRelations(current.attribute, attributeData)