I am using apollographql/graphql-server. The server responses look like:
{"data":{...},"errors":[{"message":"...","locations":...}]}
I have two questions:
I find that I can throw or return an Error object and it will be pushed to the response's errors array, but the response is sent as soon as I do so. How can I return more than one error?
Is the errors array supposed for application or server errors like bugs only? Should data checking and validation errors be placed inside data object?
Thanks in advance!