How to extend what Registration does?

We were able to extend the registration function (in our case, to add “name” as part of registration) by creating said files but we didn’t mirror over the entire contents, we simply added our own custom piece.
Is this an issue?
Will this still need to be manually updated for every Strapi update?
For example, we created a file:
./extensions/users-permissions/config/schema.graphql.js
Then just added the contents below. This produced the desired outcome of allowing us to pass in ‘name’ with register & haven’t had issues yet, but haven’t upgraded Strapi since we did this (we only did it a couple of days ago)…

const _ = require('lodash');
​
/**
 * Throws an ApolloError if context body contains a bad request
 * @param contextBody - body of the context object given to the resolver
 * @throws ApolloError if the body is a bad request
 */
function checkBadRequest(contextBody) {
  if (_.get(contextBody, 'statusCode', 200) !== 200) {
    const message = _.get(contextBody, 'error', 'Bad Request');
    const exception = new Error(message);
    exception.code = _.get(contextBody, 'statusCode', 400);
    exception.data = contextBody;
    throw exception;
  }
}
​
module.exports = {
  definition: /* GraphQL */ `
    input CustomUsersPermissionsRegisterInput {
      username: String!
      email: String!
      password: String!
      name: String!
    }
  `,
  mutation: `
    customRegister(input: CustomUsersPermissionsRegisterInput!): UsersPermissionsLoginPayload!
  `,
  resolver: {
    Mutation: {
      customRegister: {
        description: 'Register a user, but allow for additional User fields.',
        resolverOf: 'plugins::users-permissions.auth.register',
        resolver: async (obj, options, { context }) => {
          context.request.body = _.toPlainObject(options.input);
​
          await strapi.plugins['users-permissions'].controllers.auth.register(context);
          let output = context.body.toJSON ? context.body.toJSON() : context.body;
​
          checkBadRequest(output);
          return {
            user: output.user || output,
            jwt: output.jwt,
          };
        },
      },
      },
    },
};