DEV Community

Use cache.modify to update appolo graphql client

John Ding on August 09, 2022

update(cache, { data }) { cache.modify({ fields: { getCommentsByPostId(existingComments = []) { if (data.comm...
Collapse
 
thomasbnt profile image
Thomas Bnt ☕

Hello ! Don't hesitate to put colors on your codeblock like this example for have to have a better understanding of your code 😎

console.log('Hello world!');
Enter fullscreen mode Exit fullscreen mode

Example of how to add colors and syntax in codeblocks