-
Notifications
You must be signed in to change notification settings - Fork 118
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
Caching directives from apollo in schema #439
Comments
You can add cache hints dynamically to your resolvers (not only statically in your schema), see https://www.apollographql.com/docs/apollo-server/performance/caching/#adding-cache-hints-dynamically-in-your-resolvers |
Hello @iherger. I know that I can already add cache hints dynamically in the resolvers but I don't want to add in every resolver method, extra static caching code when I could do that via a directive. That's why I opened this issue to request the possibility to add custom directives using nexus-prisma. |
@akoufatzis, sorry, then I misunderstood your question. Your question seems to have been discussed before in prisma-labs/graphql-framework-experiment#53 and it seems to be in the pipeline. |
Ok then I will close this issue and follow the one you mentioned. Thank you. |
Hey, we are hitting the same problem, trying to define cacheControls on the specific queries, but have no luck. When using the constructions like Is there some known way to deal with this issue? I can't believe the whole code-first community runs without using caching :) @akoufa, could you share your findings? Thanks a lot in advance! |
Hey I am trying to introduce
@cacheControl
from https://www.apollographql.com/docs/apollo-server/performance/caching/ to provide HTTP caching headers in the response and unfortunately I cannot find a way to add them via nexus-prisma. It is only possible when using GraphQL Schema definition through SDL but I would like to define it via code-first GraphQL. Is it possible to add this functionality to nexus-prisma ?The text was updated successfully, but these errors were encountered: