-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The WS connection failed, I'm not sure where the configuration issue is #338
Comments
You seem to be getting a WebSocket error, but at first look that doesn't seem to be related to Apollo Client. Can you try to remove AC from the picture and report back if it works opening a direct WebSocket connection without Apollo Client? |
is there a demo for setting up client with the example provided doesn't that muxh |
@Sudhanshu8257 There is nothing different compared to Apollo Client outside of Next.js, you should be able to go with the normal examples. |
@wuzikai18 @Sudhanshu8257 did either of you ever figure this out? @phryneas could you provide a working example? |
I got this working with the following code: ApolloWrapper.tsx
I get the JWT token from Auth0 then pass the token in from the layout file to the wrapper. layout.tsx
|
"use client" // Helper function to create a client const wsLink = new WebSocketLink({ const splitLink = split( return new ApolloClient({ // Component to wrap your app in This is my current configuration code. There was indeed an issue with the previous WS configuration |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
The text was updated successfully, but these errors were encountered: