Improvements for migrations (#2556)

* Fix wrong var name

* Add is null is not null filtering on dates

* Simplify
This commit is contained in:
martmull
2023-11-17 14:20:33 +01:00
committed by GitHub
parent e19e7a816f
commit dea1555031
5 changed files with 10 additions and 5 deletions

View File

@ -150,9 +150,13 @@ export class WorkspaceQueryRunnerService {
)};
`);
const queryFormatted = query
.replace('neq:null', 'is:NOT_NULL')
.replace('eq:null', 'is:NULL');
const results = await workspaceDataSource?.query<PGGraphQLResult>(`
SELECT graphql.resolve($$
${query}
${queryFormatted}
$$);
`);

View File

@ -6,6 +6,7 @@ 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)) },