question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ssrForceFetchDelay` option causes useQuery calls to hang.

See original GitHub issue

Several users are indicating in #8582 that they’re having trouble with an option called ssrForceFetchDelay. As far as I can tell, it’s an option which is used in the browser to disable network fetches. I’m not sure how the option ever worked. There is this discussion item (https://github.com/apollographql/apollo-client/discussions/8060) which states that you can manually set client.disableNetworkFetches to true when hydrating, and then set it to false in the hydration callback.

client.disableNetworkFetches = true;
ReactDOM.hydrate(
  <ApolloProvider client={client}>
    <MyApp />
  </ApolloProvider>,
  MOUNT_NODE,
  () => {
    // app is hydrated!
    client.disableNetworkFetches = false;
  }
)

If anyone can provide a reproduction that would be excellent.

https://github.com/apollographql/apollo-client/issues/8582#issuecomment-895666089 @woong25 https://github.com/apollographql/apollo-client/issues/8582#issuecomment-896179483 @jrsakizci https://github.com/apollographql/apollo-client/issues/8582#issuecomment-896215262 @tm1000 https://github.com/apollographql/apollo-client/issues/8582#issuecomment-896459460 @mjspollard https://github.com/apollographql/apollo-client/issues/8582#issuecomment-896628321 @krustyc https://github.com/apollographql/apollo-client/issues/8582#issuecomment-896927171 @askurat https://github.com/apollographql/apollo-client/issues/8582#issuecomment-897098745 @simplecommerce

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
tm1000commented, Sep 7, 2021

Thank you for the work, care and efforts towards the open source community @brainkim. It does not go unnoticed!

1reaction
brainkimcommented, Sep 7, 2021

@simplecommerce That’s great to hear! Sorry for the trouble! Closing for housekeeping purposes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side rendering - Apollo GraphQL Docs
Server-side rendering (SSR) is a performance optimization for modern web apps. It enables you to render your app's initial state to raw HTML...
Read more >
Apollo Client version 3 cache update delay - Stack Overflow
I figured out that there's new property called previousData so that we can keep track of the last data that is received.
Read more >
@apollo/client | Yarn - Package Manager
... avoid clobbering/resetting existing options when useQuery is called repeatedly. ... Prevent ssrMode / ssrForceFetchDelay from causing queries to hang.
Read more >
SSR | TanStack Query Docs
If you are calling useQuery in a component deeper down in the tree you need to pass ... or getStaticProps : It will...
Read more >
UseQuery Hook in Apollo Client | GraphQL Course ... - YouTube
Hey everyone, this is the episode 6 of my new GraphQL course. Code: https://github.com/machadop1407/graphql-full-courseCourse ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found