From e00e87f40a2f7c1a5cd16ee406bc670dd7b7ff14 Mon Sep 17 00:00:00 2001 From: ladderschool Date: Sat, 19 Jul 2025 23:11:12 -0400 Subject: [PATCH 1/2] graphqlProxy mixing async and callback styles --- api/src/util/graphqlProxy.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/api/src/util/graphqlProxy.ts b/api/src/util/graphqlProxy.ts index 998a728c..6a6073e2 100644 --- a/api/src/util/graphqlProxy.ts +++ b/api/src/util/graphqlProxy.ts @@ -9,7 +9,6 @@ import { getUserProjectConfig } from './project' */ export async function graphqlProxy( fastify: FastifyInstance, - _options: never, done: HookHandlerDoneFunction ) { const webConfig = getUserProjectConfig().web From 0130a78b7943c2a2aaf3968376fa9ff4728612b4 Mon Sep 17 00:00:00 2001 From: ladderschool Date: Sun, 20 Jul 2025 01:51:58 -0400 Subject: [PATCH 2/2] incorrect parameter was removed --- api/src/util/graphqlProxy.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/src/util/graphqlProxy.ts b/api/src/util/graphqlProxy.ts index 6a6073e2..3a083f38 100644 --- a/api/src/util/graphqlProxy.ts +++ b/api/src/util/graphqlProxy.ts @@ -1,15 +1,16 @@ import httpProxy from '@fastify/http-proxy' -import type { FastifyInstance, HookHandlerDoneFunction } from 'fastify' +import type { FastifyInstance, FastifyPluginOptions } from 'fastify' import { getUserProjectConfig } from './project' /** * Graphql Proxy - Takes studio "/proxies/graphql" and forwards to the projects * graphql endpoint + * done() has been removed from the signature as fastify/fastify#5141 PR changed the signature */ export async function graphqlProxy( fastify: FastifyInstance, - done: HookHandlerDoneFunction + _options: FastifyPluginOptions ) { const webConfig = getUserProjectConfig().web const webHost = webConfig.host ?? 'localhost' @@ -24,6 +25,4 @@ export async function graphqlProxy( rewritePrefix: '/' + graphqlEndpoint.split('/').slice(3).join('/'), disableCache: true, }) - - done() }