adamsoffer / adamsoffer/next-apollo

Server side graphql requests are stacking up

Aperta
#79 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
477
Fork
62
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hey @adamsoffer I’ve been using this HOC for the past one year (when it was version 2.0.x).

Recently I decided to upgrade it to version 5 and bumped the next.js version also to latest.

But when I deployed this, all my backend servers started crashing due to heavy load. On further investigation and putting some Graphql logs, I found that the requests were stacking up on server side requests.

For example, let’s say I request 1 product for the first time, it'll get that data.

2nd time when I request for another product on server side, it'll get that data + the data for previous one.

When this is repeated for 100 products imagine the number of requests made! 🤯

Any idea as to why this is happening? I’m assuming the client is actually being shared on the server.
![D64C7105-75B1-4D46-B666-7FE0823F0D91](https://user-images.githubusercontent.com/43699825/92118208-c8ddf480-ee13-11ea-8a39-1a5fbcea11a9.jpeg)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.