Ability to disable plugin::users-permissions actions in v4 code

System Information
  • 4.10.5:
  • MacOS:
  • Postgresql:
  • 16.18.1:
  • 8.19.2:
  • 1.22.19:

Hi all… is it possible to disable user-permissions actions from index.js? I have tried (unsuccessfully). I have seen other people ask in forums such as Remove login, register, me from only graphql schema but have not been able to get it working.
Some things I have tried in the code is below. Any tips would be appreciated. Thanks

  register({ strapi }) {
    const extensionService = strapi.plugin('graphql').service('extension');
    extensionService.shadowCRUD('plugin::upload.upload').disableMutations()
    extensionService.shadowCRUD('plugin::users-permissions.controllers.auth').disableMutations()
    extensionService.shadowCRUD('plugin::users-permissions.auth').disableMutations()
    extensionService.shadowCRUD('plugin::users-permissions.auth.register').disable()
    extensionService.shadowCRUD('plugin::users-permissions.auth.register').disableAction()
    extensionService.shadowCRUD('plugin::users-permissions.auth.register').disableMutations()
    extensionService.shadowCRUD('plugin::users-permissions.register').disableMutations()
    extensionService.shadowCRUD('plugin::users-permissions.register').disableAction()