Fix/nested filter (#3624)

* fix: typo

* fix: relation type shouldn't be exposed in filter
This commit is contained in:
Jérémy M
2024-01-25 16:15:46 +01:00
committed by GitHub
parent f099ff90c1
commit 6f98d1847f
2 changed files with 5 additions and 5 deletions

View File

@ -70,7 +70,7 @@ export class FilterTypeDefinitionFactory {
for (const fieldMetadata of objectMetadata.fields) { for (const fieldMetadata of objectMetadata.fields) {
// Relation types are generated during extension of object type definition // Relation types are generated during extension of object type definition
if (isRelationFieldMetadataType(fieldMetadata.type)) { if (isRelationFieldMetadataType(fieldMetadata.type)) {
//continue; continue;
} }
const type = this.filterTypeFactory.create(fieldMetadata, options, { const type = this.filterTypeFactory.create(fieldMetadata, options, {

View File

@ -32,7 +32,7 @@ export class FilterTypeFactory {
public create( public create(
fieldMetadata: FieldMetadataInterface, fieldMetadata: FieldMetadataInterface,
buildOtions: WorkspaceBuildSchemaOptions, buildOptions: WorkspaceBuildSchemaOptions,
typeOptions: TypeOptions, typeOptions: TypeOptions,
): GraphQLInputType { ): GraphQLInputType {
const target = isCompositeFieldMetadataType(fieldMetadata.type) const target = isCompositeFieldMetadataType(fieldMetadata.type)
@ -46,8 +46,8 @@ export class FilterTypeFactory {
} else { } else {
filterType = this.typeMapperService.mapToFilterType( filterType = this.typeMapperService.mapToFilterType(
fieldMetadata.type, fieldMetadata.type,
buildOtions.dateScalarMode, buildOptions.dateScalarMode,
buildOtions.numberScalarMode, buildOptions.numberScalarMode,
); );
filterType ??= this.typeDefinitionsStorage.getInputTypeByKey( filterType ??= this.typeDefinitionsStorage.getInputTypeByKey(
@ -59,7 +59,7 @@ export class FilterTypeFactory {
if (!filterType) { if (!filterType) {
this.logger.error(`Could not find a GraphQL type for ${target}`, { this.logger.error(`Could not find a GraphQL type for ${target}`, {
fieldMetadata, fieldMetadata,
buildOtions, buildOptions,
typeOptions, typeOptions,
}); });