Import graphql-ws fails

Please help with importing

import {createClient} from ''

results in error ( e is not a function ) or Runtime error.

This module loads in the browser ( Chrome ) with no error.

If it is not possible, please advice on how to use GraphQL subscriptions in ObservableHQ.

I found this solution

graphqlWs = require("")

Hi Aleksey. Have you seen Module require debugger / Observable | Observable? It can help in these situations where an import fails; maybe you have.

Observable uses the import {this} from "that" syntax for cross-notebook imports, so it won’t work for importing ES modules. (Annoying, but the Observable syntax predates browser support for ES modules.) But you can do dynamic imports of ES modules, like:

graphqlWs = import('')

That seems to work for me, as does your second example (requiring from unpkg). As least as far as the client library loads without errors; I haven’t tested with a server. Does that help?