Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat: adding GraphQL Subscription #327

Merged
merged 2 commits into from
Oct 9, 2023
Merged

feat: adding GraphQL Subscription #327

merged 2 commits into from
Oct 9, 2023

Conversation

Freyskeyd
Copy link
Member

Description

This PR is adding GraphQL subscriptions to the current API implementation. It introduces the basic functionality and creates the new TransientStream struct to manage those new streams.

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@Freyskeyd Freyskeyd requested a review from a team as a code owner October 5, 2023 13:23
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (ae3edc9) 60.51% compared to head (d334235) 60.93%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   60.51%   60.93%   +0.42%     
==========================================
  Files         225      226       +1     
  Lines       12054    12310     +256     
==========================================
+ Hits         7294     7501     +207     
- Misses       4760     4809      +49     
Files Coverage Δ
crates/topos-api/src/graphql/errors.rs 0.00% <ø> (ø)
crates/topos-tce-api/src/graphql/builder.rs 100.00% <100.00%> (ø)
crates/topos-tce-api/src/runtime/builder.rs 81.63% <100.00%> (+0.38%) ⬆️
crates/topos-tce-api/src/runtime/commands.rs 0.00% <ø> (ø)
crates/topos-tce-api/src/stream/tests.rs 81.81% <100.00%> (+7.90%) ⬆️
crates/topos-tce-api/src/graphql/tests.rs 94.11% <94.11%> (ø)
crates/topos-tce-api/src/stream/mod.rs 69.69% <66.66%> (-0.31%) ⬇️
crates/topos-tce-api/src/graphql/query.rs 64.00% <80.64%> (+5.79%) ⬆️
crates/topos-tce-api/src/runtime/mod.rs 61.32% <0.00%> (-6.94%) ⬇️

... and 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Simon Paitrault <[email protected]>
@Freyskeyd Freyskeyd force-pushed the feature/tp-681 branch 5 times, most recently from 225362e to 3d5b6b9 Compare October 6, 2023 09:28
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question I have is about how the system will behave when the channels are full for whatever reason. Would it be very messy to add a test for that?

crates/topos-tce-api/src/graphql/query.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/graphql/query.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/graphql/query.rs Show resolved Hide resolved
crates/topos-tce-api/src/graphql/query.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/runtime/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/runtime/mod.rs Show resolved Hide resolved
crates/topos-tce-api/src/stream/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/stream/mod.rs Show resolved Hide resolved
crates/topos-tce-api/src/stream/mod.rs Show resolved Hide resolved
@Freyskeyd
Copy link
Member Author

One question I have is about how the system will behave when the channels are full for whatever reason. Would it be very messy to add a test for that?

Can you define the channels that you're talking about? We have many different kind

@Freyskeyd Freyskeyd force-pushed the feature/tp-681 branch 2 times, most recently from 25da63e to a6f376b Compare October 6, 2023 10:50
Copy link
Contributor

@gruberb gruberb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor change: Removing the comments.

crates/topos-tce-api/src/graphql/tests.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@gruberb gruberb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

crates/topos-tce-api/src/graphql/query.rs Show resolved Hide resolved
crates/topos-tce-api/src/graphql/tests.rs Outdated Show resolved Hide resolved
crates/topos-tce-api/src/runtime/mod.rs Outdated Show resolved Hide resolved
Signed-off-by: Simon Paitrault <[email protected]>
@dvdplm dvdplm merged commit da2e946 into main Oct 9, 2023
20 checks passed
@dvdplm dvdplm deleted the feature/tp-681 branch October 9, 2023 13:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants