score:0

you should use proxy.modify instead of proxy.readquery/proxy.writequery.

using cache.modify

making cache updates with mutation.update function

try to change your mutation update function to something like this:

update(proxy, result) {
  proxy.modify({
    fields: {
      events(existingevents = []) {
        return [...existingevents, result.data.createevent];
      }
    }
  })
},

Related Query

More Query from same tag