Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransferHttpCacheModule does not cache Apollo requests #1021

Open
CDDelta opened this issue Dec 25, 2018 · 5 comments
Open

TransferHttpCacheModule does not cache Apollo requests #1021

CDDelta opened this issue Dec 25, 2018 · 5 comments
Labels
docs Focuses on documentation changes good first issue Issues that are suitable for first-time contributors. waiting-for-answer

Comments

@CDDelta
Copy link

CDDelta commented Dec 25, 2018

Intended outcome:
This is more a docs problem more than anything. The docs include a recipe for using TransferHttpCacheModule to cache requests when using SSR but it does not work as the module does not support POST requests and has no intention to support it. See here. The recipe should be removed.

Actual outcome:
Two requests are performed, one on the server and another on the client.

How to reproduce the issue:
N/A

Versions
Latest

@kamilkisiela
Copy link
Owner

PR welcome, feel free to change it in the docs.

@CDDelta
Copy link
Author

CDDelta commented Dec 30, 2018

Done here: #1022

@intellix
Copy link
Contributor

intellix commented Mar 13, 2019

Can the recipe not just add method: 'GET' instead of removing? Feel like most people will just assume it's unsupported and not realise they can get it via using GET

@kamilkisiela
Copy link
Owner

I think that @intellix is right, we shouldn't remove it completely but mention it works only with GET.

I also think it would be awesome to have an ignore pattern or a whitelist in TransferHttpCacheModule because sometimes you know exactly which requests are using POST but not mutating data etc.

@kamilkisiela kamilkisiela added good first issue Issues that are suitable for first-time contributors. waiting-for-answer docs Focuses on documentation changes labels Apr 1, 2019
@matmeylan
Copy link

Is there any workaround to use TransferHttpCacheModule out of the box and transfer http state from SSR to client ? I see no mention of this POST issue in the docs. Or is the store rehydration solution the recommended way to go ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Focuses on documentation changes good first issue Issues that are suitable for first-time contributors. waiting-for-answer
Projects
None yet
Development

No branches or pull requests

4 participants