- how to set a custom error handler
- how to modify the error output
5.34.0 version we added a possibility for users to modify our
Fastify handler instance, via the
ModifyFastifyPlugin. To find our more on how and why we use
Fastify, please read this article.
With the given plugin user can change and add anything to the
Fastify instance, including the error handler.
We have our built-in error handler, but if it does not suit the user, they can change it.
There is a plugin class,
ModifyFastifyPlugin, which user can construct, or they can use a function which in turn constructs the plugin from the
In both cases of creating the Fastify modifier plugin, users need to register the plugin the same location.
Users MUST register the plugin only in the GraphQL (
apps/api/graphql/src/index.ts) Lambda handler.