|
56 | 56 | import com.linkedin.datahub.graphql.generated.DataJobInputOutput;
|
57 | 57 | import com.linkedin.datahub.graphql.generated.DataPlatform;
|
58 | 58 | import com.linkedin.datahub.graphql.generated.DataPlatformInstance;
|
| 59 | +import com.linkedin.datahub.graphql.generated.DataProcessInstance; |
59 | 60 | import com.linkedin.datahub.graphql.generated.DataQualityContract;
|
60 | 61 | import com.linkedin.datahub.graphql.generated.Dataset;
|
61 | 62 | import com.linkedin.datahub.graphql.generated.DatasetStatsSummary;
|
|
346 | 347 | import com.linkedin.datahub.graphql.types.datajob.DataJobType;
|
347 | 348 | import com.linkedin.datahub.graphql.types.dataplatform.DataPlatformType;
|
348 | 349 | import com.linkedin.datahub.graphql.types.dataplatforminstance.DataPlatformInstanceType;
|
| 350 | +import com.linkedin.datahub.graphql.types.dataprocessinst.DataProcessInstanceType; |
349 | 351 | import com.linkedin.datahub.graphql.types.dataprocessinst.mappers.DataProcessInstanceRunEventMapper;
|
350 | 352 | import com.linkedin.datahub.graphql.types.dataproduct.DataProductType;
|
351 | 353 | import com.linkedin.datahub.graphql.types.dataset.DatasetType;
|
@@ -530,6 +532,7 @@ public class GmsGraphQLEngine {
|
530 | 532 | private final FormType formType;
|
531 | 533 | private final IncidentType incidentType;
|
532 | 534 | private final RestrictedType restrictedType;
|
| 535 | + private final DataProcessInstanceType dataProcessInstanceType; |
533 | 536 |
|
534 | 537 | private final int graphQLQueryComplexityLimit;
|
535 | 538 | private final int graphQLQueryDepthLimit;
|
@@ -649,6 +652,7 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
|
649 | 652 | this.formType = new FormType(entityClient);
|
650 | 653 | this.incidentType = new IncidentType(entityClient);
|
651 | 654 | this.restrictedType = new RestrictedType(entityClient, restrictedService);
|
| 655 | + this.dataProcessInstanceType = new DataProcessInstanceType(entityClient, featureFlags); |
652 | 656 |
|
653 | 657 | this.graphQLQueryComplexityLimit = args.graphQLQueryComplexityLimit;
|
654 | 658 | this.graphQLQueryDepthLimit = args.graphQLQueryDepthLimit;
|
@@ -699,7 +703,8 @@ public GmsGraphQLEngine(final GmsGraphQLEngineArgs args) {
|
699 | 703 | formType,
|
700 | 704 | incidentType,
|
701 | 705 | restrictedType,
|
702 |
| - businessAttributeType)); |
| 706 | + businessAttributeType, |
| 707 | + dataProcessInstanceType)); |
703 | 708 | this.loadableTypes = new ArrayList<>(entityTypes);
|
704 | 709 | // Extend loadable types with types from the plugins
|
705 | 710 | // This allows us to offer search and browse capabilities out of the box for
|
@@ -1024,6 +1029,7 @@ private void configureQueryResolvers(final RuntimeWiring.Builder builder) {
|
1024 | 1029 | .dataFetcher("tag", getResolver(tagType))
|
1025 | 1030 | .dataFetcher("dataFlow", getResolver(dataFlowType))
|
1026 | 1031 | .dataFetcher("dataJob", getResolver(dataJobType))
|
| 1032 | + .dataFetcher("dataProcessInstance", getResolver(dataProcessInstanceType)) |
1027 | 1033 | .dataFetcher("glossaryTerm", getResolver(glossaryTermType))
|
1028 | 1034 | .dataFetcher("glossaryNode", getResolver(glossaryNodeType))
|
1029 | 1035 | .dataFetcher("domain", getResolver((domainType)))
|
@@ -3058,6 +3064,35 @@ private void configureDataProcessInstanceResolvers(final RuntimeWiring.Builder b
|
3058 | 3064 | "DataProcessInstance",
|
3059 | 3065 | typeWiring ->
|
3060 | 3066 | typeWiring
|
| 3067 | + .dataFetcher( |
| 3068 | + "dataPlatformInstance", |
| 3069 | + new LoadableTypeResolver<>( |
| 3070 | + dataPlatformInstanceType, |
| 3071 | + (env) -> { |
| 3072 | + final DataProcessInstance dataProcessInstance = env.getSource(); |
| 3073 | + return dataProcessInstance.getDataPlatformInstance() != null |
| 3074 | + ? dataProcessInstance.getDataPlatformInstance().getUrn() |
| 3075 | + : null; |
| 3076 | + })) |
| 3077 | + .dataFetcher( |
| 3078 | + "platform", |
| 3079 | + new LoadableTypeResolver<>( |
| 3080 | + dataPlatformType, |
| 3081 | + (env) -> { |
| 3082 | + final DataProcessInstance dataProcessInstance = env.getSource(); |
| 3083 | + return dataProcessInstance.getPlatform() != null |
| 3084 | + ? dataProcessInstance.getPlatform().getUrn() |
| 3085 | + : null; |
| 3086 | + })) |
| 3087 | + .dataFetcher("parentContainers", new ParentContainersResolver(entityClient)) |
| 3088 | + .dataFetcher( |
| 3089 | + "container", |
| 3090 | + new LoadableTypeResolver<>( |
| 3091 | + containerType, |
| 3092 | + (env) -> { |
| 3093 | + final DataProcessInstance dpi = env.getSource(); |
| 3094 | + return dpi.getContainer() != null ? dpi.getContainer().getUrn() : null; |
| 3095 | + })) |
3061 | 3096 | .dataFetcher("relationships", new EntityRelationshipsResultResolver(graphClient))
|
3062 | 3097 | .dataFetcher(
|
3063 | 3098 | "lineage",
|
|
0 commit comments