updateUserStatus method

Future<MyUserEventsVersionedMixin?> updateUserStatus(
  1. UserTextStatus? text
)

Updates or resets the MyUser.status field of 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 has the provided text as his status value already.

Implementation

Future<MyUserEventsVersionedMixin?> updateUserStatus(
  UserTextStatus? text,
) async {
  Log.debug('updateUserStatus($text)', '$runtimeType');

  final variables = UpdateUserStatusArguments(text: text);
  QueryResult res = await client.mutate(
    MutationOptions(
      operationName: 'UpdateUserStatus',
      document: UpdateUserStatusMutation(variables: variables).document,
      variables: variables.toJson(),
    ),
  );
  return UpdateUserStatus$Mutation.fromJson(res.data!).updateUserStatus;
}