Closed violabg closed 2 years ago
Hello!
Sorry, this plugin aim only REST api. We will check about GraphQL cache once it's api is finalized.
For now you can use GraphQL middleware: https://docs.strapi.io/developer-docs/latest/plugins/graphql.html#middlewares
// path: ./src/index.js
module.exports = {
register({ strapi }) {
const extensionService = strapi.plugin('graphql').service('extension');
extensionService.use({
resolversConfig: {
'Query.categories': {
middlewares: [
/**
* Basic middleware example #2
* Enable server-side shared caching
*/
async (next, parent, args, context, info) => {
info.cacheControl.setCacheHint({ maxAge: 60, scope: "PUBLIC" });
return next(parent, args, context, info);
},
],
auth: false,
},
}
})
}
}
does it work with GraphQL?