diegovfeder / apollo-client-ssr-reproducer

Apollo-client SSR will break on error-policy: all when possibleTypes is defined for InMemoryCache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@apollo/client SSR errors with possibleTypes

Steps to reproduce:

  • clone this repository
  • install dependencies yarn install
  • execute yarn start
  • open http://localhost:3000 and see the server crash with an "Invariant violation"

Next:

  • open src/index-server.tsx and src/index-client.tsx and remove the possibleTypes parameter from the InMemoryCache constructor
  • execute yarn start again
  • open http://localhost:3000 and see the apollo error being rendered

About

Apollo-client SSR will break on error-policy: all when possibleTypes is defined for InMemoryCache


Languages

Language:TypeScript 78.9%Language:JavaScript 21.1%