boostercloud / booster

Booster Framework
https://www.boosterframework.com
Apache License 2.0
409 stars 83 forks source link

Exploration: Replacing Custom GraphQL Implementation with Apollo Server Plugins #1489

Open javiertoledo opened 8 months ago

javiertoledo commented 8 months ago

In the earlier stages of the Booster Framework, we implemented a custom GraphQL protocol leveraging the graphql-ws sub-protocol implemented by the subscriptions-transport-ws library, due to the unavailability of websocket support in AWS Lambda and Azure Functions at that time. However, the landscape has evolved, and the subscriptions-transport-ws library is now deprecated. In its place, the graphql-ws library, which implements the subprotocol graphql-transport-ws, is recommended.

Presently, the Apollo Server library provides plugins that facilitate websocket implementations in AWS Lambda, Azure Functions, and also offers express middleware for local server setup. This opens up the opportunity to replace our custom implementation with a more standardized, well-supported solution, subsequently reducing the amount of code we need to maintain and ensuring better protocol support.

Links to Apollo Server Libraries required for all our target providers:

We should explore the feasibility and potential benefits of adopting these Apollo Server plugins to replace our current GraphQL implementation. This exploration should evaluate the ease of integration, protocol support, and the reduction in maintenance overhead.