Skip to content

Streaming Updates from websocket api with redux-toolkit #3033

@orioch

Description

@orioch

I am new to redux-toolkit query and also new to websocket APIs, and I am trying to get a stream of data from a websocket API and store it in a redux store.

I have read the documentation for createApi and useQuery, but I am still having difficulty understanding this part.

Here is the message structure that the websocket API gets:

{
"message_type": "xxx",
"payload": {
    "event_id": "sr:match:xxxxxx"
}

}

what parameters should createApi have so it can correctly handle the message structure and store the data in the redux store?

Thank you.

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