updateUserName method

Future<MyUserEventsVersionedMixin?> updateUserName(
  1. UserName? name
)

Updates MyUser.name field for the authenticated MyUser.

Authentication

Mandatory.

Result

One of the following MyUserEvents may be produced on success:

Idempotent

Succeeds as no-op (and returns no MyUserEvent) if the authenticated MyUser uses the provided name already.

Implementation

Future<MyUserEventsVersionedMixin?> updateUserName(UserName? name) async {
  Log.debug('updateUserName($name)', '$runtimeType');

  final variables = UpdateUserNameArguments(name: name);
  QueryResult res = await client.mutate(
    MutationOptions(
      operationName: 'UpdateUserName',
      document: UpdateUserNameMutation(variables: variables).document,
      variables: variables.toJson(),
    ),
  );
  return UpdateUserName$Mutation.fromJson(res.data!).updateUserName;
}