apollo-server-fastify FastifyDeprecation: legacy Content Type Parser function signature

Created on 30 Aug 2020  ·  5Comments  ·  Source: apollographql/apollo-server

System specs

Relevant info: Fastify - Changed Content Type Parser syntax

Error log:

(node:3288) [FSTDEP003] FastifyDeprecation: You are using the legacy Content Type Parser function signature. Use the one suggested in the documentation instead.
    at Object.emit (C:\a\Work\zen\node_modules\fastify-warning\index.js:52:13)
    at new Parser (C:\a\Work\zen\node_modules\fastify\lib\contentTypeParser.js:237:13)
    at ContentTypeParser.add (C:\a\Work\zen\node_modules\fastify\lib\contentTypeParser.js:51:18)
    at Object.addContentTypeParser (C:\a\Work\zen\node_modules\fastify\lib\contentTypeParser.js:266:30)
    at ApolloServer.<anonymous> (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\ApolloServer.js:112:30)      
    at Generator.next (<anonymous>)
    at C:\a\Work\zen\node_modules\apollo-server-fastify\dist\ApolloServer.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\ApolloServer.js:4:12)
    at app.register.prefix (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\ApolloServer.js:81:40)

(node:3288) [FSTDEP001] FastifyDeprecation: You are accessing the Node.js core request object via "request.req", Use "request.raw" instead.
    at Object.emit (C:\a\Work\zen\node_modules\fastify-warning\index.js:52:13)
    at _Request.get (C:\a\Work\zen\node_modules\fastify\lib\request.js:90:15)
    at Object.<anonymous> (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\fastifyApollo.js:22:37)
    at Generator.next (<anonymous>)
    at C:\a\Work\zen\node_modules\apollo-server-fastify\dist\fastifyApollo.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\fastifyApollo.js:4:12)
    at Object.<anonymous> (C:\a\Work\zen\node_modules\apollo-server-fastify\dist\fastifyApollo.js:19:36)
    at preHandlerCallback (C:\a\Work\zen\node_modules\fastify\lib\handleRequest.js:120:28)
    at next (C:\a\Work\zen\node_modules\fastify\lib\hooks.js:158:7)
🖇️ fastify

Most helpful comment

Appears to be fixed in apollo-server-fastify@next-v3.
https://github.com/apollographql/apollo-server/pull/4356#issuecomment-677515901

All 5 comments

Appears to be fixed in apollo-server-fastify@next-v3.
https://github.com/apollographql/apollo-server/pull/4356#issuecomment-677515901

Is there any ETA about the new version?

soon it will be a year

Apollo Server 2 does not support Fastify v3 and cannot for back-compat reasons. Apollo Server 3 is in active development and supports Fastify v3 on the release branch.

@glasser the last 3.0.0-alpha.3 was released 9 months ago and last time I'v checked there were some problems

Was this page helpful?
0 / 5 - 0 ratings