Fastify Server File [Experimental]

Hello! I wanted to hook my Fastify logging up to my system logger in api/src/lib/logger.ts and ended up here.

Using Redwood v6.6.2 (and after deleting api/server.config.ts) I was able to get things running, although I see the same errors @chenull mentioned earlier in the thread in Webstorm .

I also see this when launching yarn rw dev:

api | (node:89797) [FSTWRN002] FastifyWarning: The redwoodFastifyGraphQLServer plugin being registered mixes async and callback styles, which will result in an error in `fastify@5`

Which led me to ask, which version of Fastify is in use?

$ yarn why fastify
├─ @redwoodjs/api-server@npm:6.6.2
│  └─ fastify@npm:4.24.3 (via npm:4.24.3)
│
├─ @redwoodjs/fastify@npm:6.6.2
│  └─ fastify@npm:4.24.3 (via npm:4.24.3)
│
├─ @redwoodjs/web-server@npm:6.6.2
│  └─ fastify@npm:4.24.3 (via npm:4.24.3)
│
└─ api@workspace:api
   └─ fastify@npm:4.25.2 (via npm:^4.25.2)

So not using v5 yet so we can ignore the message, but seems like a mismatch between what version the experimental plugin is using and what Redwood wants. Thought I’d share, and let y’all know there remains interest in this direction.

Thanks!

1 Like