Skip to content

Support the resources/subscribe method #558

Open
@kentcdodds

Description

@kentcdodds

Is your feature request related to a problem? Please describe.

I would like to notify clients of updates to resources to which they've subscribed. Currently it appears the SDK does not handle the resources/subscribe request method.

Describe the solution you'd like

I would like the SDK to handle this method.

Describe alternatives you've considered

Right now I can call sendResourceUpdated which is defined as:

    async sendResourceUpdated(params) {
        return this.notification({
            method: "notifications/resources/updated",
            params,
        });
    }

It doesn't determine whether the client has subscribed to the particular resource or not. I would prefer that the SDK not send the notification to clients which have not subscribed.

Another alternative is to step outside the SDK 🤷‍♂️

Additional context

I'm unaware of popular clients (other than the inspector) which support subscriptions, but they will exist eventually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions