(id: string, values: ContactMutation)
| 47 | }, |
| 48 | |
| 49 | async set(id: string, values: ContactMutation): Promise<ContactRecord> { |
| 50 | const contact = await fakeContacts.get(id); |
| 51 | invariant(contact, `No contact found for ${id}`); |
| 52 | const updatedContact = { ...contact, ...values }; |
| 53 | fakeContacts.records[id] = updatedContact; |
| 54 | return updatedContact; |
| 55 | }, |
| 56 | |
| 57 | destroy(id: string): null { |
| 58 | delete fakeContacts.records[id]; |