Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

@Mutation resolver is not called when dispatching action #536

Open
fkolar opened this issue Jul 12, 2019 · 0 comments
Open

@Mutation resolver is not called when dispatching action #536

fkolar opened this issue Jul 12, 2019 · 0 comments

Comments

@fkolar
Copy link

fkolar commented Jul 12, 2019

Following todo example from this git and trying to make it work with REST I see @mutation is not called

export class TodosState {
  @Mutation(AddTodo)
  addTodo(args) {
    console.log('Mutation:', args);
    const todo = {
      id: args.id,
      description: args.description,
      completed: args.completed,
      __typename: 'Todo',
    };

    return todo;
  }

After I dispatch action. The only thing that is called is @update().

Please see this link:

https://github.com/fkolar/todo-rest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant