This example project demonstrates how to implement error handling in a GraphQL server using the power of GraphQL Union Types and Functional Programming (using fp-ts
library).
- Install all dependencies from the root of the repo (using
yarn
) - Run
yarn start
, alternatively to use the debugger runyarn dev
- Go to the Playground or any GraphQL client (Altair, Insomnia, ...) or just cURL:
curl -X POST 'http://localhost:4000/' -H 'Content-Type: application/json' --data-raw '{ "query": "query hello { hello }" }'