Open tomevans18 opened 6 years ago
So I have been digging into this a little more and wanted to update the ticket.
I have my project setup for SSR and I can see that the REST request isn't handled server side as it isn't part of the apollo.cache. Meaning when I run apollo.cache.extract() there is no data there.
I'm now trying to find a way to add this in on the server side and then disable the REST api request on the client when the data is already served via the server.
I'm sorry I hadn't commented yet, I've been tangled up at work. -- I'm not currently doing SSR in my stuff, but I totally support your efforts in resolving this issue.
Is this still a concern? Apollo Link Rest may need more SSR work
Hi all,
I'm new to Apollo, currently setting up my first project with a REST endpoint (as GraphQL isn't available at present)
Initially, I set this up with a GraphQL endpoint as a test, with SSR and persistent state. All worked correctly, with no requests made on the client side for the initial load (with content served initially via SSR).
When I introduced the REST endpoint I noticed that there is also network request to the REST endpoint on the client side. When I blocked this request the content still loaded as it was being served via the SSR.
For this reason, I am asking if this is actually a bug with the SSR option not being passed from Apollo client or if this is simply a setup issue. It could even be the expected behaviour due to it being a 3rd party REST URL but I'm unsure.
Thank in advance and any help would be appreciated.