HomeElementl

[dagit] RFC: useSubscription instead of DirectGraphQLSubscription

Description

[dagit] RFC: useSubscription instead of DirectGraphQLSubscription

Summary:
The other day I eliminated the WebSocketLink from our Apollo usage because we weren't using it -- everything was being done via DirectGraphQLSubscription.

In this diff, I propose replacing these callsites with Apollo's useSubscription, with fetchPolicy: 'no-cache' in place to try to avoid the performance problems that DirectGraphQLSubscription was intended to avoid. This allows us to clean up quite a bit of custom code, and will hopefully let us leverage Apollo's built-in WebSocket management (e.g. retries).

Test Plan:
View run logs, compute logs. Verify that these stream properly, render properly. In the case of switching the visible step in compute logs, verify that the step is switched properly when using the step picker.

Use grpc and restart it. Verify that the warning message appears in the left nav.

Reviewers: bengotow, prha

Reviewed By: bengotow, prha

Differential Revision: https://dagster.phacility.com/D9161

Details

Provenance
dishAuthored on Jul 30 2021, 2:21 PM
Reviewer
bengotow
Differential Revision
D9161: [dagit] RFC: useSubscription instead of DirectGraphQLSubscription
Parents
R1:3b7cafe9523b: Tests for permissions query in graphql
Branches
Unknown
Tags
Unknown