Get ids for newly added components with graphql

System Information
  • Strapi Version: 4.15.0
  • Operating System: MacOS Ventura 13.6.1
  • Database: SQLite
  • Node Version: 18.12.1
  • NPM Version: 9.2.0
  • Yarn Version: 1.22.19

I have a mutation of a collection Page which updates a list of components.
As far as I know there is no possibility to just add, remove, update, delete a particular component. Alright, I do it on frontend and then send the whole list of components to strapi. If I send the list of components as an array where some of them have ids, and other don’t, then the components with ids would be updated, and other ones would be created. As a result of updatePage I can get the list of components with actual ids. But how can I get ids only of the new components from the list?

 mutation (
    $components: [PageComponentsDynamicZoneInput!]
    $title: String
    $id: ID!
  ) {
    updatePage(id: $id, data: { title: $title, components: $components }) {
      data {
        id
        attributes {
          components {
            ...ComponentPageComponentsPageText
          }
        }
      }
    }
  }
  fragment ComponentPageComponentsPageText on ComponentPageComponentsPageText {
    id
    copytext
  }