Uncaught (in promise) ApolloError: undefined - graphql-ws #434
Unanswered
manojkumar3692
asked this question in
Q&A
Replies: 1 comment
-
Hey there, sorry I have no idea I have practically zero Apollo experience, and that error message doesn't tell me anything. If you can create a repro that I can run, I will be willing to take a look. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to implementing a socket connection, Basically, I'm trying to connect to the socket from the client side using graphql ws
im getting following error
client code :
`
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
import { GraphQLWsLink } from "@apollo/client/link/subscriptions";
import { createClient } from "graphql-ws";
const link = new GraphQLWsLink(
createClient({
url: "ws://localhost:4000/",
}),
);
const client = new ApolloClient({
uri: 'http://localhost:4000/',
cache: new InMemoryCache(),
link,
});
`
I want ws to be connected on page load and I'm trying to push data on submit, Building a simple chat application using graphql , apollo client, and react
what is the mistake I'm doing here, is it something related to the version, etc ??
Beta Was this translation helpful? Give feedback.
All reactions