lib/dashx/client.rb in dashx-0.9.0 vs lib/dashx/client.rb in dashx-0.10.0

- old
+ new

@@ -60,10 +60,29 @@ } } } ' + FETCH_CONTACTS_REQUEST = 'query FetchContacts($input: FetchContactsInput!) { + fetchContacts(input: $input) { + contacts { + id + accountId + name + kind + value + unverifiedValue + verifiedAt + status + tag + createdAt + updatedAt + } + } + } + ' + FETCH_STORED_PREFERENCES = 'query FetchStoredPreferences($input: FetchStoredPreferencesInput) { fetchStoredPreferences(input: $input) { preferenceData } } @@ -140,9 +159,13 @@ end def save_contacts(uid, contacts = []) contacts.each(&:symbolize_keys!) make_graphql_request(SAVE_CONTACTS_REQUEST, { uid: uid, contacts: contacts }) + end + + def fetch_contacts(uid) + make_graphql_request(FETCH_CONTACTS_REQUEST, { uid: uid }) end def fetch_item(identifier) make_graphql_request(FETCH_ITEM_REQUEST, { identifier: identifier }) end