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.