groupBy fix + typeMapper fix (#15433)
groupBy fix: when a group's dimension value is NULL, we need to adapt the raw sql (stage: NULL -> stage IS NULL) typeMapper fix: a graphql type should be made non-nullable if was indicated so + does not have a default value. our check on not having a default value was limited to having a null defaultValue instead of having a null or undefined defaultValue. This is a breaking change, but all the queries that were providing a null value for these args were not functioning anyway, and luckily in the FE we declared all queries adding a `!` already.
This commit is contained in:
+2
-1
@@ -15,6 +15,7 @@ import {
|
||||
} from 'graphql';
|
||||
import GraphQLJSON from 'graphql-type-json';
|
||||
import { FieldMetadataType } from 'twenty-shared/types';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
import { FieldMetadataDefaultValue } from 'src/engine/metadata-modules/field-metadata/interfaces/field-metadata-default-value.interface';
|
||||
import {
|
||||
@@ -204,7 +205,7 @@ export class TypeMapperService {
|
||||
);
|
||||
}
|
||||
|
||||
if (options.nullable === false && options.defaultValue === null) {
|
||||
if (options.nullable === false && !isDefined(options.defaultValue)) {
|
||||
graphqlType = new GraphQLNonNull(graphqlType) as unknown as T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user