/// <summary> /// Updates a commit. /// </summary> /// <param name="commitInput"></param> /// <returns>The stream's id.</returns> public async Task <bool> CommitUpdate(CancellationToken cancellationToken, CommitUpdateInput commitInput) { try { var request = new GraphQLRequest { Query = @"mutation commitUpdate($myCommit: CommitUpdateInput!){ commitUpdate(commit: $myCommit)}", Variables = new { myCommit = commitInput } }; var res = await GQLClient.SendMutationAsync <Dictionary <string, object> >(request, cancellationToken).ConfigureAwait(false); if (res.Errors != null && res.Errors.Any()) { throw new SpeckleException(res.Errors[0].Message, res.Errors); } return((bool)res.Data["commitUpdate"]); } catch (Exception e) { throw new SpeckleException(e.Message, e); } }
/// <summary> /// Updates a commit. /// </summary> /// <param name="commitInput"></param> /// <returns>The stream's id.</returns> public Task <bool> CommitUpdate(CommitUpdateInput commitInput) { return(CommitUpdate(CancellationToken.None, commitInput)); }