DEV Community

Max
Max

Posted on

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)