第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

GraphQL 和 Python 與 JSon - 未轉(zhuǎn)義字符的語法錯誤

GraphQL 和 Python 與 JSon - 未轉(zhuǎn)義字符的語法錯誤

桃花長相依 2021-06-21 17:12:16
我正在嘗試發(fā)布一個 GraphQL Mutation 并且遇到了一個我無法弄清楚的語法錯誤。我看到有一個關(guān)于轉(zhuǎn)義/非轉(zhuǎn)義字符的錯誤。我試過轉(zhuǎn)義,雙引號,單引號,沒有引號。我似乎無法解決這個問題。代碼下的回溯。# http headers for api callheaders = {    'accept': "application/json",    'content-type':"application/json",    'authorization': "bearer " + token,}# create inventory variable for mutation # will convert the csv to the json input in productioninventory:[{"supplier_id":24522,"supplier_part_number":"1-1002-9-SN","quantity_on_hand":5,"item_next_availability_date":"05-01-2018T00:00:00", "discontinued":true}]# payload of the json query to pass to the API#GraphQL Query to pull in Purchase Order Data payload = '''{"query":"mutation save_inventory($inventory: [inventoryInput]!) {  inventory {    save(inventory: $inventory, dry_run: true) {      handle    }  }}"}'''# send API call and assign response to variableresponse = requests.post(api_url, data=payload, headers=headers)錯誤我無法在下面弄清楚。  {"errors":[{"message":"Syntax Error GraphQL (1:1) Unexpected <EOF>\n\n1: \n   ^\n","category":"graphql","locations":[{"l    ine":1,"column":1}]}]}
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 103 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號