question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

apollo-server-fastify warning `beforeHandler` has been deprecated

See original GitHub issue

Packages

  • apollo-server 2.9.4
  • apollo-server-fastify 2.9.4
  • fastify 2.10.0

When registering the graphql server with fastify like this:

  const server = new ApolloServer({
    typeDefs,
    resolvers,
    context,
  });
  fastify.register(server.createHandler());

Current behavior

The following warning gets printed to the console:

(node:220) Warning: The route option `beforeHandler` has been deprecated, use `preHandler` instead

Expected behavoir

No warnings get printed to the console.

Simple runnable reproduction

See this Glitch remix

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:21
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
jsumnerscommented, Apr 23, 2020

This is about to become even more pressing for you guys. The first alpha for Fastify v3 is available https://github.com/fastify/fastify/releases/tag/v3.0.0-alpha.1

Fastify v3 removes this deprecated feature – https://github.com/fastify/fastify/commit/bf95bbf737d98212d4c2249841e2eb16973ab5cf

1reaction
AndyGuracommented, Jul 23, 2020

Hey guys, waiting this issue to be resolved for so long. Any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

apollo-server-fastify
The `apollo-server-fastify` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's ...
Read more >
apollo-server-fastify | Yarn - Package Manager
The apollo-server-fastify package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality ...
Read more >
Emit deprecation warnings with Apollo client - graphql
So coming back to GraphQL two years later I just found out that schema directives can be customized (nowadays?). So here's a solution:...
Read more >
apollo-server-fastify-no-upload - npm package
Based on project statistics from the GitHub repository for the npm package apollo-server-fastify-no-upload, we found that it has been starred ...
Read more >
GraphQL Back-End in Node.js Made Easy with NestJS
... for detailswarning apollo-server-express > graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found