Status Updates: Explore websockets and graphql subscriptions
We're considering the 'newer' approach to keeping the frontend up to date in a situation that would have previously relied on status polling.
Investigate whether WebSockets/GraphQL subscriptions are feasible for the offline transfer project, specifically for the metadata parsing step on the destination instance.
https://docs.gitlab.com/development/real_time/
https://about.gitlab.com/blog/how-we-supercharged-gitlab-ci-statuses-with-websockets/
Investigation Plan
1. Build a stripped-down WebSocket implementation
- Create a minimal WebSocket connection that works with import frontend and REST + Rails controllers backend
2. Understand WebSocket vs GraphQL Subscriptions
- Investigate whether these are separate concerns or overlapping
- Determine which one (or both) you actually need for this use case
3. Test GraphQL controller approach
- Once you have a working WebSocket pattern, test what happens if the backend uses GraphQL controllers instead of REST + Rails controllers
- See if that changes the implementation or feasibility
4. Evaluate frontend communication approach
- Research using GraphQL on the frontend to communicate with a REST backend
Edited by Oiza Baiye