Merge pull request #1965 from justinr1234/more-error-logging

More graphql error logging
This commit is contained in:
Sacha Greif 2018-04-28 11:13:49 +09:00 committed by GitHub
commit 237ddd7a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,8 @@ export const runQuery = async (query, variables = {}, context = { currentUser: {
if (result.errors) {
// eslint-disable-next-line no-console
console.log('runQuery error: '+result.errors[0].message);
console.error(`runQuery error: ${result.errors[0].message}`);
console.error(result.errors);
throw new Error(result.errors[0].message);
}