Error calling a function from graphql when started with `rw serve`

I have a serverless function called from graphql to do some async work.
This works fine when the server is started with yarn rw dev or in production.
But when I start the server with yarn rw serve I get connect ECONNREFUSED ::1:8911, is there any good reason for that?

Can you share your repo or some code sample?

Calling a serverless function from GraphQL is an odd thing to do — why not just invoke a service aka a resolver?

Can you explain the feature you are building?

Thanks for looking into this, here is a repo to repro the bug:

If you start this with yarn rw dev there is a button on the homepage that works, but it doesn’t work if you start the app with rw build && rw serve

The function I am trying to call is responsible for copying a bunch of assets in S3 and is pretty slow, so I don’t want the user to wait for the process to finish, hence our effort to call lambda function asynchronously and not wait for the function execution to be over to return a status to the user. If you think about a better way to do this I am all ears. (We are in a serverless environment)