red-napkin-59945
03/02/2022, 5:38 AMdatahub-graphql-core
module according to the "DataHub GraphQL Core" readme page:
1. Looks like the ReadMe needs some update? I could not easily find what the doc told me to do, like resources/gms.graphql
, DataLoaders
, Mappers
and DataFetchers
2. Looks like the SearchableEntityType
is deprecated. Should the new LoadableType extend SearchableEntityType? If no, what’s the alternative?
3. I am a little confused about RestliEntityClient
and JavaEntityClient
Looks like, they both finally call EntityService -> EbeanAspectDao -> DB
The difference is RestliEntityClient
send a Restli request and the Restli server calles EntityService
But JavaEntityClient
call EntityService
directly? If I would like to introduce a new entity, looks like I do not need to change them?
4. Looks like Mappers and DataFetchers are not needed now since batchLoad() return GraphQL object?big-carpet-38439
03/02/2022, 4:24 PMSearchAcrossEntitiesResolver
for handling cross-entity search in one place. You'll need to update this to add your entity to search! SearchableEntityType was previously used when we had search for each entity type separately.
3. Both of these clients do what you mentioned - eventually call the DB. One does so indirectly, over the wire. The other is "in process". This is really just to make sharing the API across different components of DataHub easier (mcl consumer, gms, etc). You should not need to change this to add a new entity. Simply use the batchGetV2
API to fetch aspects for your new entity, as detailed inside of DatasetType.java
4. Mappers are optional. Inside of your NewEntityType.java, you'll need to map the GMS objects to the auto-generated GraphQL equivalent. We tend to define mappers to do this part! You're correct that you should not need to add a DataFetcher if you've defined a Type. You simply need to register the Type class in GmsGraphQLEngine.java
red-napkin-59945
03/02/2022, 5:32 PMred-napkin-59945
03/04/2022, 12:19 AMred-napkin-59945
03/16/2022, 5:54 PMgorgeous-dinner-4055
03/16/2022, 7:02 PMbig-carpet-38439
03/19/2022, 7:06 AM