Apollo Client: offsetLimitPagination() duplicate items after delete

Viewed 78

I'm facing this weird isse, first i have this MemoryClient instance with this options:

const cache = new InMemoryCache({
  typePolicies: {
    Query: {
      fields: {
        ...
        datas: offsetLimitPagination(),
        ...
      }
    }
  }
});

I mutated the data via this mutation:

    mutateData({
      variables: {
        input : {
          id,
          delete: true,
        }        
      },
    });

After this, the item in the list was duplicated. Same id item in the same list.

0 Answers
Related