Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptor for fastify@v5 #2222

Open
2 of 6 tasks
MarioSimou opened this issue Oct 28, 2024 · 1 comment
Open
2 of 6 tasks

Adaptor for fastify@v5 #2222

MarioSimou opened this issue Oct 28, 2024 · 1 comment

Comments

@MarioSimou
Copy link
Contributor

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]:

  • am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
@github-project-automation github-project-automation bot moved this to 🌳 Triage in V5.0.0 Oct 28, 2024
@benjie
Copy link
Member

benjie commented Oct 28, 2024

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

declare global {
namespace Grafast {
interface RequestContext {
fastifyv4: {
request: FastifyRequest;
reply: FastifyReply;
};
}
}
}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🌳 Triage
Development

No branches or pull requests

3 participants
@benjie @MarioSimou and others