2016-12-12 4 views
2

GraphQLはSequelize更新を使用してnullを返します。ここに私のGraphQL更新で続行すると何も返されません

mutation { 
    updatePerson(value: {firstName: "John", lastName: "Doe", email: "[email protected]"}, where: {id: 1}){ 
    id 
    firstName 
    lastName 
    email 
    } 
} 

GraphiQL

使用して要求し、この結果

{ 
    "data": { 
    "updatePerson": { 
     "id": null, 
     "firstName": null, 
     "lastName": null, 
     "email": null 
    } 
    } 
} 

updatePerson: { 
    type: Person, 
    args: { 
    value: { 
     type: UpdatePersonInputType 
    }, 
    where: { 
     type: WhereUpdatePersonInputType 
    } 
    }, 
    resolve(_, args) { 
    return Db.models.persons.update(args.value, { 
     where: args.where 
    }); 
    } 
}, 

は、たぶん私はSequelizeアップデートを使用して間違いを犯します。誰も何が起こるか説明できますか?

+0

これに関するアップデートはありますか? – Norbert

+0

http://stackoverflow.com/a/41133634/5531595 –

答えて

関連する問題