-
Notifications
You must be signed in to change notification settings - Fork 400
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
Apollo cache control - cache hints for code first - default max age #263
Comments
I could be wrong but I dont think it works, I think because apollo-server-express doesn't do caching, hopefully will be fixed with v3 apollographql/apollo-server#2360 Not fully sure that this is the case though, I haven't found a definite answer :D |
There's also this, I will try it out when I get a chance https://github.com/19majkel94/type-graphql/blob/v0.17.4/examples/apollo-engine/index.ts |
Did you make any progress on this? |
Havent had a chance and it might be a while, check this out https://github.com/19majkel94/type-graphql/blob/v0.17.4/examples/apollo-engine/cache-control.ts |
@arjunyel @esistgut any news ? ;) I tried to put my own cache class when I configure my graphQL module and indeed, it is not used:
I tried to add the Decorator I already put in place the Dataloader to cache/batch my api REST/Database calls when resolving but I would like to cache the model already resolved to re-use it in services...any ideas ? Thx ;) |
Both |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
Is it possible to use the apollo cache control with Nest?
https://www.apollographql.com/docs/apollo-server/features/caching
This is an example code for schema first and the apollo cache control:
Is it possible to use this also with Nest and code first instead of schema first?
I configured my graphql module with this configuration, to use the default max age:
This creates the correct response header with
cache-control: max-age=60
. But it doesn't work. Every request in the next 60 seconds is not cached. All the time my resolvers will be trigered and generate a new response.Environment
The text was updated successfully, but these errors were encountered: