DEV Community

Max
Max

Posted on

1

Answer: Issue configuring apollo client on nextJS for subscriptions

It works fine for me. For previous apollo versions, you can check @xiao's package

import nextWithApollo from "next-with-apollo"
import {
  ApolloProvider,
  ApolloClient,
  ApolloLink,
  HttpLink,
  split,
} from "@apollo/client";
import { getDataFromTree } from "@apollo/client/react/ssr";
import { getMainDefinition } from "@apollo/client/utilities";
import { InMemoryCache } from "@apollo/client/cache";
import { WebSocketLink }

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay