Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. delete(): void {
  2. if (confirm('Are you sure you want to delete this book?')) {
  3. // delete
  4. this.apollo.mutate({
  5. mutation: deleteBookMutation,
  6. variables: { id: this.model.id },
  7. refetchQueries: [{
  8. query: getBooksQuery
  9. }]
  10. })
  11. .subscribe( (data: any) => {
  12. });
  13. this.reset();
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement