Skip to content

Error in graphqlProxy plugin with 3 parameters due to async function #74

@ladderschool

Description

@ladderschool

I wanted to dig into studio and I got this error.

Cannot start the development studio
FastifyError [Error]: The graphqlProxy plugin being registered mixes async and callback styles. Async plugin should not mix async and callback style.

Digging into it, the error was implemented on fastify's side due to fastify/fastify#5112 in this PR: fastify/fastify#5141

A quick and dirty fix locally to test it out yielded positive results. If I remove 'done' as the third parameter in:

api/dist/util/graphqlProxy.js
before:
async function graphqlProxy(fastify, _options, done) {
after:
async function graphqlProxy(fastify, _options) {

It all works again. I'm not sure if anyone else has noticed this but the code is here: https://github.com/redwoodjs/studio/blob/main/api/src/util/graphqlProxy.ts#L13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions