我正在尝试通过套接字连接将Graph QL查询作为消息发送,但是当我收到此消息时,似乎发送的查询有问题
{"errorCode":417,"id":-1,"payload":"Missing required numerical field 'id' "}
这是我发送的查询:
var values = new Dictionary<string, string>
{
{ "id","1"},
{ "query", "subscription {message { node {id content channel { id } from { __typename display_name }} }}" },
{ "type" , "'request'" }
};
await client.SendInstant(JsonConvert.SerializeObject( values));
有什么帮助弄清楚这是怎么回事吗?
更改{ "id","1"},
为{ "id",1},
。当您序列化对象时,它会将字符串转换为字符串,但是您要向其发送数据的Web服务在该处需要一个数字。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句