Skip to content

Conversation

@unrevised6419
Copy link
Contributor

@unrevised6419 unrevised6419 commented May 2, 2024

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

  • Allow to add cache hints to type fields
  • Allow to add cache hints to top-level Queries
  • Upgrade to nexus@next and use directive as static instead of resolve
  • Check Authenticated/Public roles cache Authenticated should be private
  • Test if the cache works fine for all field types

@vercel
Copy link

vercel bot commented May 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ❌ Failed (Inspect) May 3, 2024 2:32am

'options',
'pluginOptions',
'attributes',
'pluginOptions',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Removed duplicated value.

Comment on lines 101 to 106
graphql?: {
cacheHint?: {
find?: CacheHint;
findOne?: CacheHint;
}
};
Copy link
Contributor Author

@unrevised6419 unrevised6419 May 3, 2024

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? 🤔

@unrevised6419
Copy link
Contributor Author

I will close this experiment PR for now. Might come to it at a later time or in v5.

@unrevised6419 unrevised6419 deleted the feat/graphql-cache-control branch May 14, 2024 16:38
@strapi-bot
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants