public Task <string> DeleteUserProfileAsync(int userId, int profileId, CancellationToken token = default)
        {
            userId.EnsureGreaterThenZero();
            profileId.EnsureGreaterThenZero();

            return(Task.Run(async() =>
            {
                GraphQLResponse response;

                using (var client = GraphQLClientFactory.Create(_configurationService.GraphQLEndPointAddress, (QUERY_NAMES_HEADER, QueryNames.UserProfile)))
                {
                    response = await RetryHelper.Instance.Try(async() => await client.PostAsync
                                                              (
                                                                  GraphQLRequestFactory.Create(Properties.Settings.Default.DeleteProfileQueryString, (QueryVariableNames.UserId, userId), (QueryVariableNames.ProfileId, profileId)),
                                                                  token
                                                              ))
                               .WithTryInterval(_configurationService.TryIntervalTime)
                               .WithMaxTryCount(_configurationService.MaxTryCountLimit)
                               .WithTimeLimit(_configurationService.MaxTryTimeLimit)
                               .Until(res => !HasErrors(res))
                               .ConfigureAwait(false);
                }

                return response?.Data?.ToString() as string;
            }, token));
        }
        public IObservable <string> DeleteProfile(int userId, int profileId, CancellationToken token = default)
        {
            userId.EnsureGreaterThenZero();
            profileId.EnsureGreaterThenZero();

            var request = GraphQLRequestFactory.Create
                          (
                Properties.Settings.Default.DeleteProfileQueryString,
                (QueryVariableNames.UserId, userId),
                (QueryVariableNames.ProfileId, profileId)
                          );

            return(PostRequestObservable(request, token));
        }
 public async Task <GraphQLResponse <TResponse> > SendMutationAsync <TResponse>(IRequest request, CancellationToken token = default)
 {
     request.EnsureNotNull();
     return(await _client.SendMutationAsync <TResponse>(GraphQLRequestFactory.Create(request.Query, request.OperationName, request.Variables), token).ConfigureAwait(true));
 }