我使用了“复制数据”活动和以下请求正文:
{
"query": "query RoomStays($first: Int!, $from: Date!, $to: Date!, $after: String) {\n room_stays(\n first: $first,\n filter: {\n reservation_from: { ge: $from },\n reservation_to: { le: $to }\n },\n after: $after\n ) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n check_in\n check_out\n gross\n lodgingsGross\n additionalSales\n reservation_from\n reservation_to\n category {\n name\n }\n reservation {\n createdAt\n bookingChannelCode\n stayType {\n \tname\n \t}\n client {\n country\n }\n bookingSource {\n name\n }\n }\n }\n }\n }\n}",
"variables": {
"after": "null",
"from": "2000-01-01",
"to": "2100-01-01",
"first": 100
},
"operationName": "RoomStays"
}
它可以正常工作,没有任何问题。
现在我尝试通过“数据流”活动复制此内容:
我基本上只是把它串起来:
'{"query": "query RoomStays($first: Int!, $from: Date!, $to: Date!, $after: String) {\n room_stays(\n first: $first,\n filter: {\n reservation_from: { ge: $from },\n reservation_to: { le: $to }\n },\n after: $after\n ) {\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n cursor\n node {\n check_in\n check_out\n gross\n lodgingsGross\n additionalSales\n reservation_from\n reservation_to\n category {\n name\n }\n reservation {\n createdAt\n bookingChannelCode\n stayType {\n \tname\n \t}\n client {\n country\n }\n bookingSource {\n name\n }\n }\n }\n }\n }\n}","variables": {"after": null,"from": "2000-01-01","to": "2025-01-01","first": 10},"operationName": "RoomStays"}'
失败的原因可能是什么? 我尝试将“格式”从 JSON 更改为 None,但这并没有改变任何内容。 我不明白我在这里做错了什么。有什么帮助吗?
找到解决方案这里
您需要创建一个列,然后进行外部调用。