SendQueryAsync,无响应 问题详情这是我的代码

问题描述

问题

正如标题所暗示的那样,我发送了一个 graphql 请求,我在 3 种不同情况下执行此操作,但在其中一种情况下 方法 SendQueryAsync 只是停止而没有任何错误(尝试尝试捕获和断点)。

详情

我有一个班级来做这个请求,我多次使用它,但在一种情况下它不起作用,我不知道 为什么,或者如何调试它。

就我而言,Stacktrace 中没有什么值得注意的

这是我的代码

using GermanFishing.Model.GraphQLImages;
using GraphQL.Client.Http;
using GraphQL.Client.Serializer.Newtonsoft;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace GermanFishing.viewmodel
{
    public  class Userviewmodel
    {

        public User user_profile { get; set; }

        public Userviewmodel()
        {

            user_profile = new User();

        }


        //Consume User Data from Graphql
        public async Task GetProfileData()
        {
            var client = new GraphQLHttpClient(new GraphQLHttpClientOptions
            {
                EndPoint = new Uri("https://www.german-fishing.de/graphql"),},new NewtonsoftJsonSerializer());


            client.HttpClient.DefaultRequestHeaders.Add("Authorization","Bearer " + Convert.ToString(Application.Current.Properties["Login"]));

            var request = new GraphQLHttpRequest
            {
                Query = @"
                           query {
                                  me {
                                    name
                                    unreadNotifications {
                                      data
                                    }
                                    abonnements {
                                      id
                                      place {
                                        id
                                        name
                                      }
                                    }
                                  }
                                }"
            };

            var response = await client.SendQueryAsync<UserImage>(request).ConfigureAwait(false);

            this.user_profile = response.Data.me;
            


        }

    }
}

有什么建议可以解决这个问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)