Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delete(): void {
- if (confirm('Are you sure you want to delete this book?')) {
- // delete
- this.apollo.mutate({
- mutation: deleteBookMutation,
- variables: { id: this.model.id },
- refetchQueries: [{
- query: getBooksQuery
- }]
- })
- .subscribe( (data: any) => {
- });
- this.reset();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement