We need some endpoints in our app where normal http-requests can be received, that don’t follow any graphlq-logic. For example
async function forThirdParty(request: any, response: any, next: any): Promise<void> {
// ....
}
const app: Express = express();
const httpServer = createServer(app)
app.post('/thirdpartyWebhook', forThirdParty);
From zapier we get big email-attachments that are supposed to go to this endpoint, but when we receive it we get this error:
BadRequestError: Misordered multipart fields; files should follow ‘map’ (https://github.com/jaydenseric/graphql-multipart-request-spec).
at Busboy.<anonymous> (/root/api/dist/node_modules/graphql-upload/public/processRequest.js:259:11)
Well obviously this isn’t following graphql-anything, because it isn’t graphql. This whole request isn’t supposed to be part of the schema.
How can we tell apollo to treat this endpoint as a normal post-request endpoint, not some graphl-endpoint?