Apollo-client: in SSR useQuery return as loading state

Created on 20 Apr 2020  路  2Comments  路  Source: apollographql/apollo-client

I tried all versions of all libraries in all combinations (if you know the versions in which this does NOT happen, please tell them)

if I create apolloCLient on the server and FILL its cache with data, then when rendering React adhesions, useQuery hooks ALL EXACTLY return the value loading: true

although the data is in the cache.

this happens in ALL versions of apollo, so it makes no sense to name the versions, consider what I called: it plays in ALL versions.

How to avoid this bug?

for example, even in BETA and ALPHA versions, this bug occurs

 "dependencies": {
    "@apollo/client": "^3.0.0-beta.43",
    "@apollo/react-hooks": "^4.0.0-beta.1",
    "@apollo/react-ssr": "^4.0.0-beta.1",
    "@juggle/resize-observer": "^3.1.3",
    "@keystonejs/app-next": "^5.1.2",
    "apollo-boost": "^0.4.7",
    "apollo-cache-inmemory": "^1.6.5",
    "apollo-link-http": "^1.5.17",
    "apollo-link-schema": "^1.2.5",
    "apollo-server": "^2.12.0",
    "apollo-server-micro": "^2.12.0",

for example, even in BETA and ALPHA versions, this bug occurs

鈿涳笍 React-related

Most helpful comment

Also have the same issue, have tried every possible combination but none server render properly

All 2 comments

the problem is that the server render should be called 2 times, and called 3 times. perhaps this hint will help you find the error.

Also have the same issue, have tried every possible combination but none server render properly

Was this page helpful?
0 / 5 - 0 ratings