@@ -31,7 +31,7 @@ public class ContactType : MemberBaseType<ContactAggregate>
3131 private readonly Func < UserManager < ApplicationUser > > _userManagerFactory ;
3232 private readonly ICustomerPreferenceService _customerPreferenceService ;
3333
34- public ContactType (
34+ public ExtendableFieldAsync (
3535 IStoreService storeService ,
3636 IDynamicPropertyResolverService dynamicPropertyResolverService ,
3737 IMemberAddressService memberAddressService ,
@@ -66,21 +66,18 @@ public ContactType(
6666 Field < StringGraphType > ( "organizationId" )
6767 . ResolveAsync ( async context => await GetCurrentOrganizationId ( context ) ) ;
6868
69- Field < OrganizationType > ( "organization" )
70- . ResolveAsync ( async context =>
69+ ExtendableFieldAsync < OrganizationType > ( "organization" , resolve : async context => {
70+ var organizationId = await GetCurrentOrganizationId ( context ) ;
71+ if ( organizationId . IsNullOrEmpty ( ) )
72+ {
73+ return null ;
74+ }
75+ var query = new GetOrganizationByIdQuery ( )
7176 {
72- var organizationId = await GetCurrentOrganizationId ( context ) ;
73- if ( organizationId . IsNullOrEmpty ( ) )
74- {
75- return null ;
76- }
77-
78- var query = new GetOrganizationByIdQuery ( )
79- {
80- Id = organizationId ,
81- } ;
82- return await mediator . Send ( query ) ;
83- } ) ;
77+ Id = organizationId ,
78+ } ;
79+ return await mediator . Send ( query ) ;
80+ } ) ;
8481
8582 Field < StringGraphType > ( "selectedAddressId" )
8683 . Description ( "Selected shipping address id." )
0 commit comments