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

Support for Fastify 3 #5139

Closed
StarpTech opened this issue Apr 29, 2021 · 5 comments
Closed

Support for Fastify 3 #5139

StarpTech opened this issue Apr 29, 2021 · 5 comments

Comments

@StarpTech
Copy link
Contributor

Hi, the current plugin doesn't support fastify 3.

Reproduction: Follow https://github.com/apollographql/apollo-server/tree/main/packages/apollo-server-fastify

On server start:

 (node:18586) [FSTDEP003] FastifyDeprecation: You are using the legacy Content Type Parser function signature. Use the one suggested in the documentation instead.
(Use `node --trace-warnings ...` to show where the warning was created)
🚀 Server ready at http://localhost:4000/graphql
(node:18586) [FSTDEP001] FastifyDeprecation: You are accessing the Node.js core request object via "request.req", Use "request.raw" instead.

Response when calling the playground: GET query missing.

There are some open issues but it looks like that there is no progress. What's the current status?

Related: #4356, #4463

@glasser
Copy link
Member

glasser commented May 4, 2021

This is fixed on the release-3.0 branch. Apollo Server 3.0 is now under active development; I hope to get some alphas out within a week.

@glasser glasser closed this as completed May 4, 2021
@StarpTech
Copy link
Contributor Author

Could you point to the test?

@JanVoracek
Copy link

Hi @glasser, did you consider adding "fastify": "^2" as a peer dependency of apollo-server-fastify? It would save a lot of time spent trying to figure out why it doesn't work after upgrading the project's dependencies.

@StarpTech
Copy link
Contributor Author

I hope you mean ^3?

@glasser
Copy link
Member

glasser commented May 12, 2021

That makes sense. I want to make sure I understand the choices we've made in our existing integration libraries about deps vs peer deps and am checking in with folks who worked on this project before me.

glasser added a commit that referenced this issue Jun 15, 2021
Notably, have any sort of dependency at all on fastify (and
fast-json-stringify!) from `apollo-server-fastify`.

For now I've chosen the latest version for the peer dependencies because
carefully researching "did every API we are using exist in
[email protected]" seems like unnecessary work, but we can relax these later
upon request.

I think in practice this shouldn't affect how these packages are used
because you should generally already be using your web framework in your
app.

Fixes #5210. See also #5139.
glasser added a commit that referenced this issue Jun 15, 2021
Notably, have any sort of dependency at all on fastify (and
fast-json-stringify!) from `apollo-server-fastify`.

For now I've chosen the latest version for the peer dependencies because
carefully researching "did every API we are using exist in
[email protected]" seems like unnecessary work, but we can relax these later
upon request.

I think in practice this shouldn't affect how these packages are used
because you should generally already be using your web framework in your
app.

Fixes #5210. See also #5139.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants