Skip to content

Extend remote function's refresh with an optional server push functionality #15070

@MaxxCorp

Description

@MaxxCorp

Describe the problem

i would like to have basic convex-style live updating capabilities built into remote functions. Essentially mutations to the data on the backend should actively trigger updates on the client.

Describe the proposed solution

it would be great, if there would be an optional parameter in the new remote functions, that would, if set to true, establish e.g. a websocket channel, that would push updated data to the client.

there are two use cases:

  1. There is a page with a list and a delete remote function for some items on the page. The delete function has a refresh for the list function as part of the deletion workflow, and should return updated list data. This use case seems to be covered with single-flight mutations.
  2. items in the first use case are CRUDed not only via a UI in the app, but also via an API endpoint called by external apps. Upon a mutation of the list, the updated data should be sent to the client to update the list.

Use case 2 would be catered to by this request.

Alternatives considered

built this myself

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions