Skip to content

Not removed data from store when it deleted in API. #114

@uplus

Description

@uplus

Hi! thank you for awesome library!
I found below bug.

When deleted the data in backend, plugin-graphql doesn't remove data from Vuex store on secondary fetch.

Reproduce step

As there is a Item model(GraphQL)

  1. In frontend, Item.fetch({}, true)
  2. In frontend, Item.query().all(). At this time Items count is 5.
  3. In backend, delete one Items randomlly. Items count is 4 in DB.
  4. In frontend, Items.fetch({}, true).
  5. In frontend, Items.query().all(). At this tiem Items count is 5!!. I expect 4 😰

But Vuex-ORM's console log is below.
Inserted 4 records.

Vuex-ORM: GraphQL Plugin  Inserting Vuex-ORM: GraphQL Plugin  Inserting
records (4) [{…}, {…}, {…}, {…}]

In vuex store state, state["entities"].items.data has 5 records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions