red-napkin-59945
03/04/2022, 1:15 AM{errors=[The object type 'DataDoc' [@3117:1] does not have a field 'relationships' required via interface 'Entity' [@297:1], There is no type resolver defined for interface / union 'DataDocCell' type]}
Any suggestions about how to fix it?red-napkin-59945
03/04/2022, 1:16 AMSchemaProblem{errors=[The object type 'DataDoc' [@3117:1] does not have a field 'relationships' required via interface 'Entity' [@297:1], There is no type resolver defined for interface / union 'DataDocCell' type]}
at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:74)
at graphql.schema.idl.SchemaGenerator.makeExecutableSchema(SchemaGenerator.java:52)
at com.linkedin.datahub.graphql.GraphQLEngine.<init>(GraphQLEngine.java:57)
at com.linkedin.datahub.graphql.GraphQLEngine.<init>(GraphQLEngine.java:35)
at com.linkedin.datahub.graphql.GraphQLEngine$Builder.build(GraphQLEngine.java:158)
at com.linkedin.gms.factory.graphql.GraphQLEngineFactory.getInstance(GraphQLEngineFactory.java:104)
at com.linkedin.gms.factory.graphql.GraphQLEngineFactory$$EnhancerBySpringCGLIB$$42809780.CGLIB$getInstance$0(<generated>)
at com.linkedin.gms.factory.graphql.GraphQLEngineFactory$$EnhancerBySpringCGLIB$$42809780$$FastClassBySpringCGLIB$$68814c19.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at com.linkedin.gms.factory.graphql.GraphQLEngineFactory$$EnhancerBySpringCGLIB$$42809780.getInstance(<generated>)
big-carpet-38439
03/04/2022, 1:53 AMconfigureDataDocResolver
method...
Related: We've updated the docs to be a bit cleared based on your feedback!: https://datahubproject.io/docs/datahub-graphql-core & https://datahubproject.io/docs/metadata-service However, we should also add this!!red-napkin-59945
03/04/2022, 2:23 AMrelationships
2. need an resolver for union 'DataDocCell' type
I added the following field in my new entity definition, the first error is fixed
"""
Edges extending from this entity
"""
relationships(input: RelationshipsInput!): EntityRelationshipsResult
But the second one still existred-napkin-59945
03/04/2022, 7:03 AMdiff --git a/datahub-graphql-core/src/main/resources/entity.graphql b/datahub-graphql-core/src/main/resources/entity.graphql
index bf1a47c3e..ffa3f85b0 100644
--- a/datahub-graphql-core/src/main/resources/entity.graphql
+++ b/datahub-graphql-core/src/main/resources/entity.graphql
@@ -3177,6 +3177,11 @@ type DataDoc implements Entity {
The Domain associated with the DataDoc
"""
domain: Domain
+
+ """
+ Edges extending from this entity
+ """
+ relationships(input: RelationshipsInput!): EntityRelationshipsResult
}
"""
@@ -3192,7 +3197,11 @@ type DataDocContent {
"""
The Union of every DataDocCell
"""
-union DataDocCell = ChartCell | TextCell | QueryCell
+type DataDocCell {
+ chartCell: ChartCell
+ textCell: TextCell
+ queryChell: QueryCell
+}
red-napkin-59945
03/08/2022, 8:32 PMEntityType
I would like to suggest some refactor to reduce the duplicated code 🙂big-carpet-38439
03/08/2022, 8:34 PMred-napkin-59945
03/08/2022, 8:37 PMred-napkin-59945
03/09/2022, 6:50 AMEntityTypeMapper
class if I added a new entity type, I think I do not need to change ENTITY_TYPE_TO_NAME
, right?big-carpet-38439
03/14/2022, 11:18 PMbig-carpet-38439
03/14/2022, 11:18 PM