Skip to content

Abort live sync / sync_render when a dependency updates #59

@thruflo

Description

@thruflo

So, you can provide a Shape or stream or subscribe function that automatically knows when to invalidate and re-run a live shape request which depends on some data/params.

From:

conn
|> Phoenix.Sync.Controller.sync_render(params, query)

To:

conn
|> Phoenix.Sync.Controller.sync_render(params, {queryFn, dependencies: [Model.Task]})

So shape definitions can be dynamic with function and dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions