Skip to content

refactor(streaming-widget): drop subgraph workaround for streaming-sdk 1.1.0 - #229

Merged
blueogin merged 3 commits into
mainfrom
chore/streaming-sdk-1.1.0
Sep 2, 2026
Merged

blueogin merged 3 commits into
mainfrom
chore/streaming-sdk-1.1.0

Conversation

@blueogin

@blueogin blueogin commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

@goodsdks/streaming-sdk 1.1.0 adds a status filter to queryStreams, so currentFlowRate_gt: "0" is no longer hardcoded into the query documents and ended streams can finally be fetched through the SDK.

That was the only reason streamsSubgraph.ts existed — a hand-rolled GraphQL module issuing the same query without the filter, added so the History tab could show closed streams. It carried a "drop this once upstream grows a way to include ended streams" note. Upstream grew one, so this removes it and puts the widget back on SubgraphClient.

About # (link your issue here)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • PR title matches follow: (Feature|Bug|Chore) Task Name
  • My code follows the style guidelines of this project
  • I have followed all the instructions described in the initial task (check Definitions of Done)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added reference to a related issue in the repository
  • I have added a detailed description of the changes proposed in the pull request. I am as descriptive as possible, assisting reviewers as much as possible.
  • I have added screenshots related to my pull request (for frontend tasks)
  • I have pasted a gif showing the feature.
  • @mentions of the person or team responsible for reviewing proposed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The refactor is self-contained and consistent, with only a minor documentation wording tweak noted in review comments.

Pull request overview

This PR updates the streaming widget to rely on @goodsdks/streaming-sdk v1.1.0’s new status filtering for queryStreams, allowing ended streams to be fetched via the SDK and removing the now-unnecessary custom subgraph workaround module.

Changes:

  • Bump @goodsdks/streaming-sdk from 1.0.0 to 1.1.0.
  • Replace the hand-rolled streamsSubgraph GraphQL querying with SubgraphClient.queryStreams({ status: 'all' }).
  • Remove packages/streaming-widget/src/adapter/streamsSubgraph.ts and update adapter/domain types accordingly.
File summaries
File Description
pnpm-lock.yaml Locks the workspace dependency graph to @goodsdks/streaming-sdk@1.1.0.
packages/streaming-widget/package.json Bumps @goodsdks/streaming-sdk to 1.1.0.
packages/streaming-widget/src/adapter/useStreamingClients.ts Instantiates/passes a SubgraphClient instead of a raw subgraph URL.
packages/streaming-widget/src/adapter/useStreamingData.ts Uses subgraphClient.queryStreams({ direction: 'all', status: 'all' }) to populate streams + history.
packages/streaming-widget/src/adapter/domain.ts Switches query-row typing to SDK StreamQueryResult and uses isActive/closedAtTimestamp fields.
packages/streaming-widget/src/adapter.ts Wires subgraphClient through the adapter instead of streamsEndpoint.
packages/streaming-widget/src/adapter/streamsSubgraph.ts Deleted: removes the custom GraphQL/pagination workaround for ended streams.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 6/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 191 to +192
/** Superfluid subgraph endpoint for the connected chain */
streamsEndpoint: string | null
subgraphClient: SubgraphClient | null
@blueogin
blueogin merged commit bb50848 into main Sep 2, 2026
14 checks passed

This branch was successfully deployed

5 active deployments
preview-storybook — df1b549c Deployed Sep 2, 2026 by blueogin via preview #357
preview-superfluid-campaign — df1b549c Deployed Sep 2, 2026 by blueogin via preview #167
preview-ai-credits — df1b549c Deployed Sep 2, 2026 by blueogin via preview #320
preview-gooddata — df1b549c Deployed Sep 2, 2026 by blueogin via gooddata-web-preview #70
internal — df1b549c Deployed Sep 2, 2026 by blueogin via authorize-preview #357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants