react-apollo icon indicating copy to clipboard operation
react-apollo copied to clipboard

[ssr: 4-beta.1 + client: 3-beta.42] a non-deterministic outcome when doing almost the same queries

Open rokinsky opened this issue 5 years ago • 0 comments

Intended outcome:

I was trying to fetch different data for the same variable in separate queries and collect it with the initial state using renderToStringWithData

Actual outcome:

I receive a non-deterministic outcome:

  • The first data is null and the initial state is full.
  • The second data is null and the initial state is partial.

How to reproduce the issue:

Try to refresh the page a few times and see the result: https://codesandbox.io/s/react-apollo-ssr-beta-k911i Expected behavior with working stable version: https://codesandbox.io/s/react-apollo-ssr-stable-xhf28

Version

  System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
  Binaries:
    Node: 10.18.1 - /tmp/yarn--1585959352947-0.5534012226920866/node
    Yarn: 1.21.1 - /tmp/yarn--1585959352947-0.5534012226920866/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  npmPackages:
    @apollo/client: 3.0.0-beta.42 => 3.0.0-beta.42
    @apollo/react-hoc: 4.0.0-beta.1 => 4.0.0-beta.1
    @apollo/react-ssr: 4.0.0-beta.1 => 4.0.0-beta.1

rokinsky avatar Apr 04 '20 00:04 rokinsky