Skip to content

Why create a new Client on the fly for every request in getServerSideProps #1521

Answered by JoviDeCroock
gszliu asked this question in Q&A
Discussion options

You must be logged in to vote

The phrasing might be a bit off but we create a separate client just for the initial server-side render. This makes it so that we can do a bunch of requests on that client and it will only live in the closure of that initial data request. We should always utilize the ssrCache.extractData() method. This PR will shed more light on the different methods as next-urql has two ways of using it #1502

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@gszliu
Comment options

@JoviDeCroock
Comment options

@gszliu
Comment options

@JoviDeCroock
Comment options

@gszliu
Comment options

Answer selected by gszliu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants