Javascript 查询图中的参数使用NodeJS断开JSON

Javascript 查询图中的参数使用NodeJS断开JSON,javascript,node.js,graphql,Javascript,Node.js,Graphql,我的脚本通过fetch连接到graphqlapi,并在postgresql数据库中插入JSON返回,但是当我在查询中插入primaryLabels参数时,它返回我的JSON被token>破坏的消息。 如果我去掉这个参数,一切都会很顺利,有解决办法吗? 我试图将查询转换为字符串,但代码仍然失败 代码 let queryAPI = {"query": `{squads {name cards(includedOnKanban: true, closed: false, archived: false

我的脚本通过fetch连接到graphqlapi,并在postgresql数据库中插入JSON返回,但是当我在查询中插入primaryLabels参数时,它返回我的JSON被token>破坏的消息。 如果我去掉这个参数,一切都会很顺利,有解决办法吗? 我试图将查询转换为字符串,但代码仍然失败

代码

let queryAPI = {"query": `{squads {name cards(includedOnKanban: true, closed: false, archived: false, cancelled: false, updatedSince: \"2020-01-01T00:00:00-0300\") { identifier title description status priority assignees { fullname email } secondaryLabel primaryLabels swimlane workstate}}}`};

(async () => {

    try {

        const rawResponse = await fetch('https://www.bluesight.io/graphql', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'Bluesight-API-Token': 'token-here'
            },
            body: JSON.stringify(queryAPI)
        });

        const content = await rawResponse.json();
输出

    at async C:\Users\Documents\Autoportal\Bluesight\index.js:35:25 {
  name: 'FetchError',
  message: 'invalid json response body at https://www.bluesight.io/graphql reason: Unexpected token < in JSON at position 0',        
  type: 'invalid-json'
{
  squads: [ { name: 'SUPPORT IT', cards: [Array] } ]
}

由于我们无法重现问题,因此获得尽可能多的信息将非常有用:您能显示错误的堆栈跟踪吗?你能以一种只有问题部分可见的方式最小化代码吗?
Unexpected token<在JSON中的位置0
这就是html的启动方式。你确定你没有从nginx或其他什么地方得到错误页面吗?哪一行是第35行?你发布的JSON结果示例有两个错误:在
“title”中缺少
”:“ALL-Validate data,
“secondary label”之前缺少
@LuisHenrique
console.log(JSON.stringify(rawResponse))
取完后立即进行。您很可能会看到一个HTML