apollo-server-integrations / apollo-server-integration-aws-lambda

An integration to use AWS Lambda as a hosting service with Apollo Server
MIT License
46 stars 9 forks source link

Better DX around failing on startup #134

Open trevor-scheer opened 11 months ago

trevor-scheer commented 11 months ago

Right now, serverless gateway applications are stuck with "startup but fail on every request" in the case that the gateway fails to load its schema, so the process doesn't actually die. This could be improved by installing a startupDidFail plugin by default or at least documenting it as a recommendation in the README.

Update: it's been brought to my attention that Lambda can in fact handle async initialization and that it might be able to move to a standard await apolloServer.start() mode of operation vs the less optimal startInBackgroundHandlingStartupErrorsByLoggingAndFailingAllRequests() method.