Skip to content

Commit

Permalink
fix: disable data loaders (until they are fixed)
Browse files Browse the repository at this point in the history
Refs: HP-2082
  • Loading branch information
charn committed Jan 30, 2024
1 parent aaffcbe commit 39c37c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions profiles/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 39c37c1

Please sign in to comment.