How to throw multiple errors with express-graphql?
问题 In an express-graphql app, I have a userLogin resolver like so: const userLogin = async ({ id, password }), context, info) => { if (!id) { throw new Error('No id provided.') } if (!password) { throw new Error('No password provided.') } // actual resolver logic here // … } If the user doesn't provide an id AND a password , it will throw only one error. { "errors": [ { "message": "No id provided.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "userLogin" ] } ], "data": { "userLogin":