Skip to content

Commit

Permalink
Merge remote-tracking branch 'private/gabe--addingUserMutations' into…
Browse files Browse the repository at this point in the history
… gabe--addingUserMutations
  • Loading branch information
gabe-lyons committed Feb 2, 2022
2 parents 4baab06 + cbedf7e commit 6f817a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 52 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,6 @@ private void configureCorpUserResolvers(final RuntimeWiring.Builder builder) {
.dataFetcher("relationships", new AuthenticatedResolver<>(
new EntityRelationshipsResultResolver(graphClient)
))
.dataFetcher("editableProperties", new AuthenticatedResolver(new CorpUserEditablePropertiesResolver(
this.entityClient,
"corpuser",
"corpUserEditableInfo")))
);
builder.type("CorpUserInfo", typeWiring -> typeWiring
.dataFetcher("manager", new AuthenticatedResolver<>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.linkedin.datahub.graphql.types.corpuser.mappers;

import com.linkedin.datahub.graphql.generated.CorpUserEditableInfo;
import com.linkedin.datahub.graphql.generated.CorpUserEditableProperties;
import com.linkedin.datahub.graphql.types.mappers.ModelMapper;

import javax.annotation.Nonnull;
Expand All @@ -10,20 +10,23 @@
*
* To be replaced by auto-generated mappers implementations
*/
public class CorpUserEditableInfoMapper implements ModelMapper<com.linkedin.identity.CorpUserEditableInfo, CorpUserEditableInfo> {
public class CorpUserEditableInfoMapper implements ModelMapper<com.linkedin.identity.CorpUserEditableInfo, CorpUserEditableProperties> {

public static final CorpUserEditableInfoMapper INSTANCE = new CorpUserEditableInfoMapper();

public static CorpUserEditableInfo map(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
public static CorpUserEditableProperties map(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
return INSTANCE.apply(info);
}

@Override
public CorpUserEditableInfo apply(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
final CorpUserEditableInfo result = new CorpUserEditableInfo();
public CorpUserEditableProperties apply(@Nonnull final com.linkedin.identity.CorpUserEditableInfo info) {
final CorpUserEditableProperties result = new CorpUserEditableProperties();
result.setAboutMe(info.getAboutMe());
result.setSkills(info.getSkills());
result.setTeams(info.getTeams());
result.setEmail(info.getEmail());
result.setPhone(info.getPhone());
result.setSlack(info.getSlack());
if (info.hasPictureLink()) {
result.setPictureLink(info.getPictureLink().toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public CorpUser apply(@Nonnull final CorpUserSnapshot corpUser) {
result.setProperties(CorpUserPropertiesMapper.map(CorpUserInfo.class.cast(aspect)));
result.setInfo(CorpUserInfoMapper.map(CorpUserInfo.class.cast(aspect)));
} else if (aspect instanceof CorpUserEditableInfo) {
result.setEditableInfo(CorpUserEditableInfoMapper.map(CorpUserEditableInfo.class.cast(aspect)));
result.setEditableProperties(CorpUserEditableInfoMapper.map(CorpUserEditableInfo.class.cast(aspect)));
} else if (aspect instanceof GlobalTags) {
result.setGlobalTags(GlobalTagsMapper.map(GlobalTags.class.cast(aspect)));
} else if (aspect instanceof CorpUserStatus) {
Expand Down

0 comments on commit 6f817a1

Please sign in to comment.