diff --git a/services/api/src/resources/project/resolvers.ts b/services/api/src/resources/project/resolvers.ts index dfe56b4247..1d1b720957 100644 --- a/services/api/src/resources/project/resolvers.ts +++ b/services/api/src/resources/project/resolvers.ts @@ -68,7 +68,7 @@ export const getProjectDeployKey: ResolverFn = async ( export const getAllProjects: ResolverFn = async ( root, - { order, createdAfter, gitUrl }, + { order, createdAfter, gitUrl, buildImage }, { sqlClientPool, hasPermission, models, keycloakGrant, keycloakUsersGroups } ) => { let userProjectIds: number[]; @@ -97,6 +97,10 @@ export const getAllProjects: ResolverFn = async ( queryBuilder = queryBuilder.andWhere('git_url', gitUrl); } + if (buildImage) { + queryBuilder = queryBuilder.and.whereNot('build_image', ''); + } + if (userProjectIds) { queryBuilder = queryBuilder.whereIn('id', userProjectIds); }