Trying to connect to wrong WebSocket after ::re-graph/init
opened this issue · comments
Deleted user commented
We dispatch ::re-graph/init
with:
{:ws-url "ws://localhost:8888/graphql-ws"
:http-url "http://localhost:8888/graphql"
...}
With re-graph 0.1.6 the re-frame database contains afterwards:
:re-graph {
{:ws-url "ws://localhost:8888/graphql-ws"
:http-url "http://localhost:8888/graphql"
...}; This is REALLY the key of the following value!
{:websocket {:url "ws://localhost:9500/graphql-ws" ...}
:http-url "/graphql"
...}
}
With 0.1.4 and otherwise the same code the database would contain:
:re-graph {
:websocket {:url "ws://localhost:8888/graphql-ws" ...}
:http-url "http://localhost:8888/graphql"
...
}
Oliver Hine commented
Hi,
Yes I just realised this the other day. You can add an additional argument nil
at the 0 index i.e.
(re-frame/dispatch [::re-graph/init nil {opts...}])
Or else use the re-graph/init
function which has two arities.
Deleted user commented
What is the status of this? Is a bugfix release planned?
Oliver Hine commented
Hi,
Yes I think I will fix this, I should be able to find time in the next two days.
Cheers
Oliver Hine commented
Hi @urzds this is fixed in 0.1.7
Thanks for reporting.
Deleted user commented
Thanks for the fix!