我正在使用Python请求Pipefy GraphQLAPI。 我已经阅读了文档并在pipefy论坛中进行了搜索,但是 我想不出下面的问题是什么:
pipeId = '171258'
query ="""
{
"query": "{allCards(pipeId: %s, first: 30, after: 'WyIxLjAiLCI1ODAuMCIsMzI0OTU0NF0'){pageInfo{endCursor hasNextPage}edges{node{id title}}}}"
}
"""%(pipeid)
在我添加了after
参数之前,查询工作得非常好。
我已经尝试过类似的变化:
after: "WyIxLjAiLCI1ODAuMCIsMzI0OTU0NF0"
after: \"WyIxLjAiLCI1ODAuMCIsMzI0OTU0NF0\"
after: \n"WyIxLjAiLCI1ODAuMCIsMzI0OTU0NF0\n"
我知道问题与转义有关,因为API返回如下消息:
'{"errors":[{"locations":[{"column":45,"line":1}],"message":"token recognition error at: \'\'\'"},{"locations":[{"column":77,"line":1}],"message":"token recognition error at: \'\'\'"}]}\n'
(使用after: 'WyIxLjAiLCI1ODAuMCIsMzI0OTU0NF0'
发出请求时返回此消息)
这里的任何帮助都是极其有限的! 谢谢
我今天遇到了和你一样的问题(在Pipefy的支持页面上看到了你的帖子)。我个人接触了Pipefy的开发者,但他们一点帮助都没有
我通过正确地转义查询解决了这个问题
试着这样做:
在光标中包含的双引号之前,使用单引号定义字符串和双反斜杠
使用下面的代码片段,您可以调用函数
get_card_list
传递身份验证令牌(作为字符串)和管道id(作为整数),并检索管道的整个卡列表get_card_list
函数将调用函数request_card_list
,直到hasNextpage设置为False,在每次调用中更新光标谢谢你的回答,我能做下一步。 如何使用变量传递查询的“after”参数 因为这很难,我决定在这里分享给那些面临同样挑战的人
相关问题 更多 >
编程相关推荐