`export 'createClient' was not found in 'graphql-ws'`
I'm experiencing this issue after explicitly adding graphql-ws as a dependency. Unfortunately, I'm using Webpacker (Ruby on Rails), so I don't really have direct access to the webpack config to figure out what's going wrong or work around it.
There's two things that are especially weird here:
- I'm not actually using
createGraphiQLFetcher. The root source file this bundle is below. - This happens after asset bundles are actually produced, so I can actually use things in development. I just can't deploy because this breaks my CI process.
import React from "react";
import ReactDOM from "react-dom";
import GraphiQL from "graphiql";
const App = () => (
React.createElement(GraphiQL, {
fetcher: async graphQLParams => {
const data = await fetch(
window.location.origin + "/v1",
{
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify(graphQLParams),
},
);
return data.json().catch(() => data.text());
}
})
);
ReactDOM.render(React.createElement(App), document.getElementById('root'));
Any thoughts on what I might be getting wrong here? What extra information can I provide to make it easier to help sort out what's happening?
Hey @MrJoy 👋 can you please provide the graphiql version that you're using and the version of graphql-ws that you installed?
I'm sorry, I should've thought to include that! >.<
The problem occurs with graphiql 1.8.10, but not 1.8.9. The installed version of graphiql-ws is 5.8.2.
Also, it occurs to me my wording was vague: I am getting this even after adding graphql-ws. I don't actually use websockets, and only added it in an attempt to resolve a failure that resulted when updating graphiql.
@thomasheyenbrock Hi, We're having the same issue. Were you able to find a workaround?