尝试提出以下请求:
axios({
headers: {
Accept: 'application/json',
},
method: 'post',
url: 'http://localhost:4000/graphql',
data: {
query: `mutation {login(email: "myEmail", password: "MyCoolPasswordHello") {token refreshToken}`,
},
}).then(function(response) {
console.log('done');
});
应该像游乐场:
mutation
{
login(email:"myEmail", password:"MyCoolPasswordHello")
{token
refreshToken}
}
但我不断得到
Syntax Error: Expected Name, found <EOF>
qq_笑_17
莫回无
相关分类