morph dataloader specific (#13259)
In the metadata GraphQL api, we need the resolveField for the morphRelations. This PR implements this topic. Fixes https://github.com/twentyhq/core-team-issues/issues/1234 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
FieldMetadataLoaderPayload,
|
||||
IndexFieldMetadataLoaderPayload,
|
||||
IndexMetadataLoaderPayload,
|
||||
MorphRelationLoaderPayload,
|
||||
RelationLoaderPayload,
|
||||
} from 'src/engine/dataloaders/dataloader.service';
|
||||
import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto';
|
||||
@@ -23,6 +24,16 @@ export interface IDataloaders {
|
||||
}
|
||||
>;
|
||||
|
||||
morphRelationLoader: DataLoader<
|
||||
MorphRelationLoaderPayload,
|
||||
{
|
||||
sourceObjectMetadata: ObjectMetadataEntity;
|
||||
targetObjectMetadata: ObjectMetadataEntity;
|
||||
sourceFieldMetadata: FieldMetadataEntity;
|
||||
targetFieldMetadata: FieldMetadataEntity;
|
||||
}[]
|
||||
>;
|
||||
|
||||
fieldMetadataLoader: DataLoader<
|
||||
FieldMetadataLoaderPayload,
|
||||
FieldMetadataDTO[]
|
||||
|
||||
Reference in New Issue
Block a user