From 478ae575068197be030660a85441f893c6694b7b Mon Sep 17 00:00:00 2001 From: Juha Louhiranta Date: Tue, 30 Jan 2024 17:18:40 +0200 Subject: [PATCH] fix: disable data loaders (until they are fixed) Refs: HP-2082 --- profiles/schema.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/profiles/schema.py b/profiles/schema.py index 33f3bb46..c215a790 100644 --- a/profiles/schema.py +++ b/profiles/schema.py @@ -538,21 +538,28 @@ class Meta: contact_method = ContactMethod() def resolve_primary_email(self: Profile, info, **kwargs): + return self.get_primary_email() return info.context.primary_email_for_profile_loader.load(self.id) def resolve_primary_phone(self: Profile, info, **kwargs): + return self.phones.get(primary=True) return info.context.primary_phone_for_profile_loader.load(self.id) def resolve_primary_address(self: Profile, info, **kwargs): + return self.addresses.get(primary=True) return info.context.primary_address_for_profile_loader.load(self.id) def resolve_emails(self: Profile, info, **kwargs): + return self.emails.all() + # TODO These loaders make things fail? return info.context.emails_by_profile_id_loader.load(self.id) def resolve_phones(self: Profile, info, **kwargs): + return self.phones.all() return info.context.phones_by_profile_id_loader.load(self.id) def resolve_addresses(self: Profile, info, **kwargs): + return self.addresses.all() return info.context.addresses_by_profile_id_loader.load(self.id)