-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
feat(graphql): allow to pass cache hints to graphql fields #20254
feat(graphql): allow to pass cache hints to graphql fields #20254
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -12,7 +12,6 @@ const dtoFields = [ | |||
'options', | |||
'pluginOptions', | |||
'attributes', | |||
'pluginOptions', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Removed duplicated value.
graphql?: { | ||
cacheHint?: { | ||
find?: CacheHint; | ||
findOne?: CacheHint; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Why is this field type not visible in find/findOne resolvers? 🤔
I will close this experiment PR for now. Might come to it at a later time or in v5. |
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/how-can-we-configure-graphql-cachecontrol-with-shadowcrud/39842/2 |
What does it do?
2024-05-03.03-24-48.mp4
Why is it needed?
https://www.apollographql.com/docs/apollo-server/performance/caching/
Note: Strapi uses a previous major version of Apollo Server, which works similarly.
How to test it?
Provide information about the environment and the path to verify the behaviour.
To Do
nexus@next
and use directive as static instead of resolve