Private queries with Apollo Server and Express
I other post I was using a private and public schema to return 401 http status. But I found a better solution to change the response http status from the server.

I other post I was using a private and public schema to return 401 http status. But I found a better solution to change the response http status from the server.
I just created a package that work with validatorJS and Typescript decorators to validate your classes.
(you can read a better solution here)
The GraphQL Spec that defines how errors should be handled. That means Apollo Server cannot send 401 server error, each request sent http status 200. Even if you have an authenticate issue, it will return a JSON with http status 200. My plan to handle it is to create two shemas, one private and one public.
In this post I want to show you how to handle server errors like 404, 500, 403, etc. Also "Network Connection error" and validation errors u others.