oliyh / re-graph

A graphql client for clojurescript and clojure
460 stars 39 forks source link

check existence of js/window to avoid undefined access #51

Closed loomis closed 4 years ago

loomis commented 4 years ago

I'm using re-graph in a node environment for running automated functional tests against a GraphQL server. A dependency on js/window causes the re-graph initialization to fail, even if the :ws-url is set explicitly to nil. This PR introduces an additional check to avoid this problem in non-browser environments.

oliyh commented 4 years ago

Many thanks, glad to hear of new uses for re-graph!

oliyh commented 4 years ago

In 0.1.11-SNAPSHOT now

oliyh commented 4 years ago

And now in 0.1.11