Adventures in Nodeland - Issue #8 - Wecome Mercurius Auth!
Hi Everyone! Last week has been a flurry of activity on all Open Source projects I’m maintaining - check them out!
Mercurius
Mercurius is the GraphQL plugin for Fastify that I wrote and spoke in the past quite a lot. Mercurius Auth builds upon Mercurius to provide a contex-aware authorization system that allows you to restrict the access to resolvers and external services in case of gateway. Jonny Green did an amazing implementation that wraps the resolvers with an auth check whenever the @auth directive is specified.
I’m really excited about this new library as I implemented authorisation systems several times and this looks as a massive time saver. Check it out!
Fastify
Every now and then I get asked how Fastify came to be, or why Fastify is having the great adoption it is currently having. The secret sauce is its community. I spoke extensively on the topic at last year OpenJS World.
Fastify v3.15.1 shipped last Friday that improved the user experience in case of bad configuration values:
- https://github.com/fastify/fastify/pull/3049 - do not crash if a route is registered without a url.
- https://github.com/fastify/fastify/pull/3035 - reply.hasHeader should include node core res.hasHeader!
Thanks to Simone Sanfratello, we also reached 100% code coverage!
Pino
At the JS Monthly live meetup I spoke about the design of pino.transport() and why it makes all the difference.
I worked a little bit on the topic and crafted a very basic example that demonstrate how to use the new transport API to log with prettyPrint to the stdout and to a file with level warn:
OSS life
Almost 3 years ago I started working on adding support to Async Iterators to Node.js core APIs. One of those is using async iterators to receive events! Yesterday Luciano posted a snippet showing how to process incoming requests using an async iterator… in the end it’s something you should not do, as you might inadvertently force your server to only process one request at a time!
Undici
Undici is the new HTTP/1.1 client for Node.js that we are developing outside of Node.js core. We have shipped the first release candidate: you can test it with “npm i undici@4.0.0-rc.1”.
NearForm
I work as a Technical Director at NearForm and I am also responsible to interview candidates. We are still hiring across the board for senior roles, so if you would like to work with me, apply at:
Thanks
Thank you very much for enjoying this newsletter and engaging with it over Twitter! I always receive such a warm welcome for all content I produce and I cannot be happier.