Missing the joincolumnname parsing (#13898)
in graphql-selecvted-fields-parser, we forgot to treat the joincolumnname case, on top of the relation itself.
This commit is contained in:
+18
@@ -83,6 +83,15 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
if (
|
||||
isFieldMetadataEntityOfType(fieldMetadata, FieldMetadataType.RELATION)
|
||||
) {
|
||||
const joinColumnName = fieldMetadata.settings?.joinColumnName;
|
||||
|
||||
if (
|
||||
isDefined(joinColumnName) &&
|
||||
isDefined(graphqlSelectedFields[joinColumnName])
|
||||
) {
|
||||
accumulator.select[joinColumnName] = true;
|
||||
}
|
||||
|
||||
const graphqlSelectedFieldValue =
|
||||
graphqlSelectedFields[fieldMetadata.name];
|
||||
|
||||
@@ -116,6 +125,15 @@ export class GraphqlQuerySelectedFieldsParser {
|
||||
continue;
|
||||
}
|
||||
|
||||
const joinColumnName = fieldMetadata.settings?.joinColumnName;
|
||||
|
||||
if (
|
||||
isDefined(joinColumnName) &&
|
||||
isDefined(graphqlSelectedFields[joinColumnName])
|
||||
) {
|
||||
accumulator.select[joinColumnName] = true;
|
||||
}
|
||||
|
||||
const morphRelationFieldName = computeMorphRelationFieldName({
|
||||
fieldName: fieldMetadata.name,
|
||||
relationDirection: fieldMetadata.settings.relationType,
|
||||
|
||||
Reference in New Issue
Block a user