diff --git a/front/src/modules/activities/tasks/hooks/useCurrentUserDueTaskCount.ts b/front/src/modules/activities/tasks/hooks/useCurrentUserDueTaskCount.ts index 509c1e52f..ee3ad4bc1 100644 --- a/front/src/modules/activities/tasks/hooks/useCurrentUserDueTaskCount.ts +++ b/front/src/modules/activities/tasks/hooks/useCurrentUserDueTaskCount.ts @@ -12,7 +12,7 @@ export const useCurrentUserTaskCount = () => { objectNamePlural: 'activities', filter: { type: { eq: 'Task' }, - completedAt: { eq: null }, + completedAt: { is: 'NULL' }, assigneeId: { eq: currentWorkspaceMember?.id }, }, }); diff --git a/front/src/modules/activities/tasks/hooks/useTasks.ts b/front/src/modules/activities/tasks/hooks/useTasks.ts index ee605de5d..9a3c2447f 100644 --- a/front/src/modules/activities/tasks/hooks/useTasks.ts +++ b/front/src/modules/activities/tasks/hooks/useTasks.ts @@ -28,7 +28,7 @@ export const useTasks = (entity?: ActivityTargetableEntity) => { skip: !entity && !selectedFilter, filter: { type: { equals: 'Task' }, - completedAt: { neq: null }, + completedAt: { is: 'NOT_NULL' }, ...whereFilters, }, orderBy: [ @@ -43,7 +43,7 @@ export const useTasks = (entity?: ActivityTargetableEntity) => { skip: !entity && !selectedFilter, filter: { type: { equals: 'Task' }, - completedAt: { eq: null }, + completedAt: { is: 'NULL' }, ...whereFilters, }, orderBy: [ diff --git a/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx b/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx index c24ee7185..4163a7518 100644 --- a/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx +++ b/front/src/pages/settings/developers/api-keys/SettingsDevelopersApiKeys.tsx @@ -50,7 +50,7 @@ export const SettingsDevelopersApiKeys = () => { const { foundObjectMetadataItem } = useFindOneObjectMetadataItem({ objectNameSingular: 'apiKey', }); - const filter = { revokedAt: { eq: null } }; + const filter = { revokedAt: { is: 'NULL' } }; useFindManyObjectRecords({ objectNamePlural: 'apiKeys', filter, diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/big-float-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/big-float-filter.input-type.ts index 217a7070e..245993626 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/big-float-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/big-float-filter.input-type.ts @@ -5,6 +5,8 @@ import { GraphQLFloat, } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const BigFloatFilterType = new GraphQLInputObjectType({ name: 'BigFloatFilter', fields: { @@ -15,5 +17,6 @@ export const BigFloatFilterType = new GraphQLInputObjectType({ lt: { type: GraphQLFloat }, lte: { type: GraphQLFloat }, neq: { type: GraphQLFloat }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/big-int-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/big-int-filter.input-type.ts index ab404aad6..3d97c1724 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/big-int-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/big-int-filter.input-type.ts @@ -5,6 +5,8 @@ import { GraphQLInt, } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const BigIntFilterType = new GraphQLInputObjectType({ name: 'BigIntFilter', fields: { @@ -15,5 +17,6 @@ export const BigIntFilterType = new GraphQLInputObjectType({ lt: { type: GraphQLInt }, lte: { type: GraphQLInt }, neq: { type: GraphQLInt }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/boolean-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/boolean-filter.input-type.ts index 79f1480ce..c96f05341 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/boolean-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/boolean-filter.input-type.ts @@ -1,8 +1,11 @@ import { GraphQLBoolean, GraphQLInputObjectType } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const BooleanFilterType = new GraphQLInputObjectType({ name: 'BooleanFilter', fields: { eq: { type: GraphQLBoolean }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/date-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/date-filter.input-type.ts index 2b56e9352..8344f4bee 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/date-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/date-filter.input-type.ts @@ -1,17 +1,18 @@ import { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; import { DateScalarType } from 'src/workspace/workspace-schema-builder/graphql-types/scalars'; export const DateFilterType = new GraphQLInputObjectType({ name: 'DateFilter', fields: { eq: { type: DateScalarType }, - is: { type: DateScalarType }, gt: { type: DateScalarType }, gte: { type: DateScalarType }, in: { type: new GraphQLList(new GraphQLNonNull(DateScalarType)) }, lt: { type: DateScalarType }, lte: { type: DateScalarType }, neq: { type: DateScalarType }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/date-time-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/date-time-filter.input-type.ts index d5ac00d52..64580bd35 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/date-time-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/date-time-filter.input-type.ts @@ -1,5 +1,6 @@ import { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; import { DateTimeScalarType } from 'src/workspace/workspace-schema-builder/graphql-types/scalars'; export const DatetimeFilterType = new GraphQLInputObjectType({ @@ -12,5 +13,6 @@ export const DatetimeFilterType = new GraphQLInputObjectType({ lt: { type: DateTimeScalarType }, lte: { type: DateTimeScalarType }, neq: { type: DateTimeScalarType }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type.ts new file mode 100644 index 000000000..4acc83e2e --- /dev/null +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type.ts @@ -0,0 +1,16 @@ +import { GraphQLEnumType } from 'graphql'; + +export const FilterIsNullable = new GraphQLEnumType({ + name: 'FilterIsNullable', + description: 'This enum to filter by nullability', + values: { + NULL: { + value: 'NULL', + description: 'Nulish values', + }, + NOT_NULL: { + value: 'NOT_NULL', + description: 'Non-nulish values', + }, + }, +}); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/float-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/float-filter.input-type.ts index 12e3c89e8..ee51bbe33 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/float-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/float-filter.input-type.ts @@ -5,6 +5,8 @@ import { GraphQLNonNull, } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const FloatFilterType = new GraphQLInputObjectType({ name: 'FloatFilter', fields: { @@ -15,5 +17,6 @@ export const FloatFilterType = new GraphQLInputObjectType({ lt: { type: GraphQLFloat }, lte: { type: GraphQLFloat }, neq: { type: GraphQLFloat }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/int-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/int-filter.input-type.ts index 9b4c33aed..9ff27926d 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/int-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/int-filter.input-type.ts @@ -5,6 +5,8 @@ import { GraphQLInt, } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const IntFilterType = new GraphQLInputObjectType({ name: 'IntFilter', fields: { @@ -15,5 +17,6 @@ export const IntFilterType = new GraphQLInputObjectType({ lt: { type: GraphQLInt }, lte: { type: GraphQLInt }, neq: { type: GraphQLInt }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/string-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/string-filter.input-type.ts index 6ea2bf9c1..1c28b5d68 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/string-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/string-filter.input-type.ts @@ -5,6 +5,8 @@ import { GraphQLString, } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; + export const StringFilterType = new GraphQLInputObjectType({ name: 'StringFilter', fields: { @@ -20,5 +22,6 @@ export const StringFilterType = new GraphQLInputObjectType({ ilike: { type: GraphQLString }, regex: { type: GraphQLString }, iregex: { type: GraphQLString }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/time-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/time-filter.input-type.ts index eb71dd694..9a6528121 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/time-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/time-filter.input-type.ts @@ -1,5 +1,6 @@ import { GraphQLInputObjectType, GraphQLList, GraphQLNonNull } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; import { TimeScalarType } from 'src/workspace/workspace-schema-builder/graphql-types/scalars'; export const TimeFilterType = new GraphQLInputObjectType({ @@ -12,5 +13,6 @@ export const TimeFilterType = new GraphQLInputObjectType({ lt: { type: TimeScalarType }, lte: { type: TimeScalarType }, neq: { type: TimeScalarType }, + is: { type: FilterIsNullable }, }, }); diff --git a/server/src/workspace/workspace-schema-builder/graphql-types/input/uuid-filter.input-type.ts b/server/src/workspace/workspace-schema-builder/graphql-types/input/uuid-filter.input-type.ts index 9cdd76a7f..4cfba8365 100644 --- a/server/src/workspace/workspace-schema-builder/graphql-types/input/uuid-filter.input-type.ts +++ b/server/src/workspace/workspace-schema-builder/graphql-types/input/uuid-filter.input-type.ts @@ -1,5 +1,6 @@ import { GraphQLInputObjectType, GraphQLList } from 'graphql'; +import { FilterIsNullable } from 'src/workspace/workspace-schema-builder/graphql-types/input/filter-is-nullable.input-type'; import { UUIDScalarType } from 'src/workspace/workspace-schema-builder/graphql-types/scalars'; export const UUIDFilterType = new GraphQLInputObjectType({ @@ -8,5 +9,6 @@ export const UUIDFilterType = new GraphQLInputObjectType({ eq: { type: UUIDScalarType }, in: { type: new GraphQLList(UUIDScalarType) }, neq: { type: UUIDScalarType }, + is: { type: FilterIsNullable }, }, });