graphile / crystal

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!
https://graphile.org/
Other
12.62k stars 571 forks source link

Adaptor for fastify@v5 #2222

Open MarioSimou opened 3 weeks ago

MarioSimou commented 3 weeks ago

Feature description

Currently, PostGraphile supports Fastify version 4 only. However, with the recent release of Fastify version 5, we aim to extend our support to include this latest version

Supporting development

I [tick all that apply]:

benjie commented 3 weeks ago

The main thing when doing this is to ensure that the fastifyv5 request context entry is registered; it should look like:

https://github.com/graphile/crystal/blob/19420562a3d7b49e3cde8f4ff0ece5b8286e43d8/grafast/grafserv/src/servers/fastify/v4/index.ts#L28-L37

You code should not import from fastify at all - only types should be imported.