Skip to content

[FEATURE] Add event-driven refecting to useFlowQuery #2457

@jribbink

Description

@jribbink

Issue to be solved

Currently, useFlowQuery is naiive to any state changes on chain that may have affected the query result and can only refetch when manually triggered by developers or within the boundaries of React Query.

It would be extremely useful to have the ability to update UI state in response to on-chain events.

Suggest A Solution

Something along the lines of:

useFlowQuery({
   ...stuff,
   refectchEvents: [
        {
            event: "A.1234.SomethingHappened"
            filter: (evt) => evt.data.user === "FooBar"
         }
    ]
})

What are you currently working on that this is blocking?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions