Closed gslopez closed 6 years ago
Looks fine to me, but just out of curiosity, why does graphql break if an external library throws an string instead of an error object?
Thanks !!
I checked the error again, and the problem is that graphql library is using bluebird library for promise management and, I am not sure why, if i throw a String error the application crush without showing the true error location. The log in this case was the following:
(node:92825) Warning: a promise was rejected with a non-error: [object String]
(node:92825) Warning: a promise was rejected with a non-error: [object String]
(node:92825) Warning: a promise was rejected with a non-error: [object String]
{ Error: Invalid integer: 0.00086505000000000000
at Market.<anonymous> (/Users/username/workspace/projectName/node_modules/graphql-tools/src/schemaGenerator.ts:545:60)
.
.
<More graphql errors>
.
.
Graphql doesn't work with BigInteger without this change.