257
257
import com .linkedin .datahub .graphql .resolvers .mutate .RemoveTagResolver ;
258
258
import com .linkedin .datahub .graphql .resolvers .mutate .RemoveTermResolver ;
259
259
import com .linkedin .datahub .graphql .resolvers .mutate .UpdateDescriptionResolver ;
260
+ import com .linkedin .datahub .graphql .resolvers .mutate .UpdateDisplayPropertiesResolver ;
260
261
import com .linkedin .datahub .graphql .resolvers .mutate .UpdateNameResolver ;
261
262
import com .linkedin .datahub .graphql .resolvers .mutate .UpdateParentNodeResolver ;
262
263
import com .linkedin .datahub .graphql .resolvers .mutate .UpdateUserSettingResolver ;
297
298
import com .linkedin .datahub .graphql .resolvers .settings .user .UpdateCorpUserViewsSettingsResolver ;
298
299
import com .linkedin .datahub .graphql .resolvers .settings .view .GlobalViewsSettingsResolver ;
299
300
import com .linkedin .datahub .graphql .resolvers .settings .view .UpdateGlobalViewsSettingsResolver ;
301
+ import com .linkedin .datahub .graphql .resolvers .siblings .SiblingsSearchResolver ;
300
302
import com .linkedin .datahub .graphql .resolvers .step .BatchGetStepStatesResolver ;
301
303
import com .linkedin .datahub .graphql .resolvers .step .BatchUpdateStepStatesResolver ;
302
304
import com .linkedin .datahub .graphql .resolvers .structuredproperties .CreateStructuredPropertyResolver ;
314
316
import com .linkedin .datahub .graphql .resolvers .test .UpdateTestResolver ;
315
317
import com .linkedin .datahub .graphql .resolvers .timeline .GetSchemaBlameResolver ;
316
318
import com .linkedin .datahub .graphql .resolvers .timeline .GetSchemaVersionListResolver ;
319
+ import com .linkedin .datahub .graphql .resolvers .timeline .GetTimelineResolver ;
317
320
import com .linkedin .datahub .graphql .resolvers .type .AspectInterfaceTypeResolver ;
318
321
import com .linkedin .datahub .graphql .resolvers .type .EntityInterfaceTypeResolver ;
319
322
import com .linkedin .datahub .graphql .resolvers .type .HyperParameterValueTypeResolver ;
376
379
import com .linkedin .datahub .graphql .types .notebook .NotebookType ;
377
380
import com .linkedin .datahub .graphql .types .ownership .OwnershipType ;
378
381
import com .linkedin .datahub .graphql .types .policy .DataHubPolicyType ;
382
+ import com .linkedin .datahub .graphql .types .post .PostType ;
379
383
import com .linkedin .datahub .graphql .types .query .QueryType ;
380
384
import com .linkedin .datahub .graphql .types .restricted .RestrictedType ;
381
385
import com .linkedin .datahub .graphql .types .role .DataHubRoleType ;
389
393
import com .linkedin .entity .client .EntityClient ;
390
394
import com .linkedin .entity .client .SystemEntityClient ;
391
395
import com .linkedin .metadata .client .UsageStatsJavaClient ;
396
+ import com .linkedin .metadata .config .ChromeExtensionConfiguration ;
392
397
import com .linkedin .metadata .config .DataHubConfiguration ;
393
398
import com .linkedin .metadata .config .IngestionConfiguration ;
394
399
import com .linkedin .metadata .config .TestsConfiguration ;
@@ -496,6 +501,7 @@ public class GmsGraphQLEngine {
496
501
private final TestsConfiguration testsConfiguration ;
497
502
private final DataHubConfiguration datahubConfiguration ;
498
503
private final ViewsConfiguration viewsConfiguration ;
504
+ private final ChromeExtensionConfiguration chromeExtensionConfiguration ;
499
505
500
506
private final DatasetType datasetType ;
501
507
@@ -540,6 +546,7 @@ public class GmsGraphQLEngine {
540
546
private final FormType formType ;
541
547
private final IncidentType incidentType ;
542
548
private final RestrictedType restrictedType ;
549
+ private final PostType postType ;
543
550
private final DataProcessInstanceType dataProcessInstanceType ;
544
551
private final VersionSetType versionSetType ;
545
552
@@ -620,6 +627,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
620
627
this .datahubConfiguration = args .datahubConfiguration ;
621
628
this .viewsConfiguration = args .viewsConfiguration ;
622
629
this .featureFlags = args .featureFlags ;
630
+ this .chromeExtensionConfiguration = args .chromeExtensionConfiguration ;
623
631
624
632
this .datasetType = new DatasetType (entityClient );
625
633
this .roleType = new RoleType (entityClient );
@@ -662,6 +670,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
662
670
this .formType = new FormType (entityClient );
663
671
this .incidentType = new IncidentType (entityClient );
664
672
this .restrictedType = new RestrictedType (entityClient , restrictedService );
673
+ this .postType = new PostType (entityClient );
665
674
this .dataProcessInstanceType = new DataProcessInstanceType (entityClient , featureFlags );
666
675
this .versionSetType = new VersionSetType (entityClient );
667
676
@@ -713,6 +722,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
713
722
entityTypeType ,
714
723
formType ,
715
724
incidentType ,
725
+ postType ,
716
726
versionSetType ,
717
727
restrictedType ,
718
728
businessAttributeType ,
@@ -873,7 +883,8 @@ public GraphQLEngine.Builder builder() {
873
883
.addSchema (fileBasedSchema (INCIDENTS_SCHEMA_FILE ))
874
884
.addSchema (fileBasedSchema (CONTRACTS_SCHEMA_FILE ))
875
885
.addSchema (fileBasedSchema (COMMON_SCHEMA_FILE ))
876
- .addSchema (fileBasedSchema (VERSION_SCHEMA_FILE ));
886
+ .addSchema (fileBasedSchema (VERSION_SCHEMA_FILE ))
887
+ .addSchema (fileBasedSchema (QUERY_SCHEMA_FILE ));
877
888
878
889
for (GmsGraphQLPlugin plugin : this .graphQLPlugins ) {
879
890
List <String > pluginSchemaFiles = plugin .getSchemaFiles ();
@@ -1002,7 +1013,8 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) {
1002
1013
this .testsConfiguration ,
1003
1014
this .datahubConfiguration ,
1004
1015
this .viewsConfiguration ,
1005
- this .featureFlags ))
1016
+ this .featureFlags ,
1017
+ this .chromeExtensionConfiguration ))
1006
1018
.dataFetcher ("me" , new MeResolver (this .entityClient , featureFlags ))
1007
1019
.dataFetcher ("search" , new SearchResolver (this .entityClient ))
1008
1020
.dataFetcher (
@@ -1088,6 +1100,7 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) {
1088
1100
.dataFetcher (
1089
1101
"executionRequest" , new GetIngestionExecutionRequestResolver (this .entityClient ))
1090
1102
.dataFetcher ("getSchemaBlame" , new GetSchemaBlameResolver (this .timelineService ))
1103
+ .dataFetcher ("getTimeline" , new GetTimelineResolver (this .timelineService ))
1091
1104
.dataFetcher (
1092
1105
"getSchemaVersionList" , new GetSchemaVersionListResolver (this .timelineService ))
1093
1106
.dataFetcher ("test" , getResolver (testType ))
@@ -1352,6 +1365,9 @@ private void configureMutationResolvers(final RuntimeWiring.Builder builder) {
1352
1365
"createOwnershipType" , new CreateOwnershipTypeResolver (this .ownershipTypeService ))
1353
1366
.dataFetcher (
1354
1367
"updateOwnershipType" , new UpdateOwnershipTypeResolver (this .ownershipTypeService ))
1368
+ .dataFetcher (
1369
+ "updateDisplayProperties" ,
1370
+ new UpdateDisplayPropertiesResolver (this .entityService ))
1355
1371
.dataFetcher (
1356
1372
"deleteOwnershipType" , new DeleteOwnershipTypeResolver (this .ownershipTypeService ))
1357
1373
.dataFetcher ("submitFormPrompt" , new SubmitFormPromptResolver (this .formService ))
@@ -1735,7 +1751,10 @@ private void configureDatasetResolvers(final RuntimeWiring.Builder builder) {
1735
1751
.dataFetcher ("exists" , new EntityExistsResolver (entityService ))
1736
1752
.dataFetcher ("runs" , new EntityRunsResolver (entityClient ))
1737
1753
.dataFetcher ("privileges" , new EntityPrivilegesResolver (entityClient ))
1738
- .dataFetcher ("parentContainers" , new ParentContainersResolver (entityClient )))
1754
+ .dataFetcher ("parentContainers" , new ParentContainersResolver (entityClient ))
1755
+ .dataFetcher (
1756
+ "siblingsSearch" ,
1757
+ new SiblingsSearchResolver (this .entityClient , this .viewService )))
1739
1758
.type (
1740
1759
"Owner" ,
1741
1760
typeWiring ->
@@ -1768,6 +1787,13 @@ private void configureDatasetResolvers(final RuntimeWiring.Builder builder) {
1768
1787
datasetType ,
1769
1788
(env ) ->
1770
1789
((ForeignKeyConstraint ) env .getSource ()).getForeignDataset ().getUrn ())))
1790
+ .type (
1791
+ "Deprecation" ,
1792
+ typeWiring ->
1793
+ typeWiring .dataFetcher (
1794
+ "replacement" ,
1795
+ new EntityTypeResolver (
1796
+ entityTypes , (env ) -> ((Deprecation ) env .getSource ()).getReplacement ())))
1771
1797
.type (
1772
1798
"SiblingProperties" ,
1773
1799
typeWiring ->
@@ -1878,10 +1904,16 @@ private void configureSchemaFieldResolvers(final RuntimeWiring.Builder builder)
1878
1904
builder .type (
1879
1905
"SchemaFieldEntity" ,
1880
1906
typeWiring ->
1881
- typeWiring .dataFetcher (
1882
- "parent" ,
1883
- new EntityTypeResolver (
1884
- entityTypes , (env ) -> ((SchemaFieldEntity ) env .getSource ()).getParent ())));
1907
+ typeWiring
1908
+ .dataFetcher (
1909
+ "parent" ,
1910
+ new EntityTypeResolver (
1911
+ entityTypes , (env ) -> ((SchemaFieldEntity ) env .getSource ()).getParent ()))
1912
+ .dataFetcher ("relationships" , new EntityRelationshipsResultResolver (graphClient ))
1913
+ .dataFetcher (
1914
+ "lineage" ,
1915
+ new EntityLineageResultResolver (
1916
+ siblingGraphService , restrictedService , this .authorizationConfiguration )));
1885
1917
}
1886
1918
1887
1919
private void configureEntityPathResolvers (final RuntimeWiring .Builder builder ) {
@@ -1935,10 +1967,12 @@ private void configureCorpUserResolvers(final RuntimeWiring.Builder builder) {
1935
1967
new LoadableTypeBatchResolver <>(
1936
1968
dataPlatformType ,
1937
1969
(env ) ->
1938
- ((CorpUserEditableProperties ) env .getSource ())
1939
- .getPlatforms ().stream ()
1940
- .map (DataPlatform ::getUrn )
1941
- .collect (Collectors .toList ()))));
1970
+ ((CorpUserEditableProperties ) env .getSource ()).getPlatforms () != null
1971
+ ? ((CorpUserEditableProperties ) env .getSource ())
1972
+ .getPlatforms ().stream ()
1973
+ .map (DataPlatform ::getUrn )
1974
+ .collect (Collectors .toList ())
1975
+ : ImmutableList .of ())));
1942
1976
}
1943
1977
1944
1978
/**
@@ -3065,11 +3099,20 @@ private void configureQueryEntityResolvers(final RuntimeWiring.Builder builder)
3065
3099
.type (
3066
3100
"QuerySubject" ,
3067
3101
typeWiring ->
3068
- typeWiring .dataFetcher (
3069
- "dataset" ,
3070
- new LoadableTypeResolver <>(
3071
- datasetType ,
3072
- (env ) -> ((QuerySubject ) env .getSource ()).getDataset ().getUrn ())));
3102
+ typeWiring
3103
+ .dataFetcher (
3104
+ "dataset" ,
3105
+ new LoadableTypeResolver <>(
3106
+ datasetType ,
3107
+ (env ) -> ((QuerySubject ) env .getSource ()).getDataset ().getUrn ()))
3108
+ .dataFetcher (
3109
+ "schemaField" ,
3110
+ new LoadableTypeResolver <>(
3111
+ schemaFieldType ,
3112
+ (env ) ->
3113
+ ((QuerySubject ) env .getSource ()).getSchemaField () != null
3114
+ ? ((QuerySubject ) env .getSource ()).getSchemaField ().getUrn ()
3115
+ : null )));
3073
3116
}
3074
3117
3075
3118
private void configureOwnershipTypeResolver (final RuntimeWiring .Builder builder ) {
@@ -3098,13 +3141,26 @@ private void configureDataProcessInstanceResolvers(final RuntimeWiring.Builder b
3098
3141
"DataProcessInstance" ,
3099
3142
typeWiring ->
3100
3143
typeWiring
3144
+ .dataFetcher ("exists" , new EntityExistsResolver (entityService ))
3145
+ .dataFetcher (
3146
+ "platform" ,
3147
+ new LoadableTypeResolver <>(
3148
+ dataPlatformType ,
3149
+ (env ) -> {
3150
+ final DataProcessInstance dataProcessInstance = env .getSource ();
3151
+ return dataProcessInstance != null
3152
+ && dataProcessInstance .getPlatform () != null
3153
+ ? dataProcessInstance .getPlatform ().getUrn ()
3154
+ : null ;
3155
+ }))
3101
3156
.dataFetcher (
3102
3157
"dataPlatformInstance" ,
3103
3158
new LoadableTypeResolver <>(
3104
3159
dataPlatformInstanceType ,
3105
3160
(env ) -> {
3106
3161
final DataProcessInstance dataProcessInstance = env .getSource ();
3107
- return dataProcessInstance .getDataPlatformInstance () != null
3162
+ return dataProcessInstance != null
3163
+ && dataProcessInstance .getDataPlatformInstance () != null
3108
3164
? dataProcessInstance .getDataPlatformInstance ().getUrn ()
3109
3165
: null ;
3110
3166
}))
@@ -3117,6 +3173,11 @@ private void configureDataProcessInstanceResolvers(final RuntimeWiring.Builder b
3117
3173
final DataProcessInstance dpi = env .getSource ();
3118
3174
return dpi .getContainer () != null ? dpi .getContainer ().getUrn () : null ;
3119
3175
}))
3176
+ .dataFetcher (
3177
+ "parentTemplate" ,
3178
+ new EntityTypeResolver (
3179
+ entityTypes ,
3180
+ (env ) -> ((DataProcessInstance ) env .getSource ()).getParentTemplate ()))
3120
3181
.dataFetcher ("relationships" , new EntityRelationshipsResultResolver (graphClient ))
3121
3182
.dataFetcher (
3122
3183
"lineage" ,
0 commit comments