Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changeset for using RpcRequest and RpcResponse in RPC Subscriptions #3407

Merged

Conversation

lorisleiva
Copy link
Collaborator

@lorisleiva lorisleiva commented Oct 21, 2024

This PR adds a changeset combining several smaller changes in the previous PRs of this stack. That way, we provide a slightly more digest changelog.

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: 13363b7

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

Added via Giphy

Copy link
Collaborator Author

lorisleiva commented Oct 23, 2024

Merge activity

  • Oct 23, 4:43 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Oct 23, 5:02 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 23, 5:04 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 23, 5:06 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 23, 5:07 AM EDT: A user merged this pull request with Graphite.

lorisleiva added a commit that referenced this pull request Oct 23, 2024
This PR changes the configs of the `executeRpcPubSubSubscriptionPlan` function such that it accepts a "Subscribe Request" as a `RpcRequest` object instead of a `subscribeMethodName` and `subscribeParams` duo.

This mean we can now use the `RpcRequestTransformer` provided in a more idiomatic way.

Note: A changeset for this PR is included in #3407.
lorisleiva added a commit that referenced this pull request Oct 23, 2024
This PR refactors the definition of a Response Transformer in the RPC Subscriptions architecture from `<T>(response: unknown, notificationName: string) => T;` to `RpcResponseTransformer`.

That way, both the RPC and RPC Subscriptions architectures use the same interfaces for transforming requests and responses which means we can refactoring helper method like `getDefaultResponseTransformerForSolanaRpcSubscriptions` in a more composable way (using the `pipe` function like we did with default RPC Response Transformer).

Note: A changeset for this PR is included in #3407.
@lorisleiva lorisleiva changed the base branch from loris/use-rpc-request-in-plan-executor to graphite-base/3407 October 23, 2024 08:58
lorisleiva added a commit that referenced this pull request Oct 23, 2024
This PR replaces the `notificationName` and `params` arguments of the `RpcSubscriptionsPlanExecutor` function by a single `request` argument of type `RpcRequest`. This request argument is meant to represent the user intent to request a subscription from the RPC Subscriptions packages.

Note: A changeset for this PR is included in #3407.
@lorisleiva lorisleiva changed the base branch from graphite-base/3407 to master October 23, 2024 09:00
@lorisleiva lorisleiva force-pushed the loris/add-changeset-for-rpc-request-response-changes branch 2 times, most recently from 3b41daa to 14ca5cc Compare October 23, 2024 09:03
@lorisleiva lorisleiva force-pushed the loris/add-changeset-for-rpc-request-response-changes branch from 14ca5cc to 13363b7 Compare October 23, 2024 09:05
@lorisleiva lorisleiva merged commit 10b08ac into master Oct 23, 2024
6 checks passed
@lorisleiva lorisleiva deleted the loris/add-changeset-for-rpc-request-response-changes branch October 23, 2024 09:07
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2024
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