From 003213d223b36a425014e4c46d331a75681a0bdf Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Sun, 27 Feb 2022 15:26:43 +0300 Subject: [PATCH] fix: Adjust null flag for step model fields --- package.json | 2 +- packages/backend/src/graphql/mutations/create-step.ts | 1 + packages/backend/src/models/step.ts | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5f546c3b..34ec7550 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@automatisch/root", "private": true, "scripts": { - "start": "lerna run --stream --scope=@*/{web,backend,docs} dev", + "start": "lerna run --stream --parallel --scope=@*/{web,docs,backend} dev", "start:web": "lerna run --stream --scope=@*/web dev", "start:backend": "lerna run --stream --scope=@*/backend dev", "lint": "lerna run --no-bail --stream --scope=@*/{web,backend,cli} lint", diff --git a/packages/backend/src/graphql/mutations/create-step.ts b/packages/backend/src/graphql/mutations/create-step.ts index 53546042..46021808 100644 --- a/packages/backend/src/graphql/mutations/create-step.ts +++ b/packages/backend/src/graphql/mutations/create-step.ts @@ -44,6 +44,7 @@ const createStepResolver = async ( appKey: input.appKey, type: StepEnumType.Action, position: previousStep.position + 1, + parameters: {}, }); const nextSteps = await flow diff --git a/packages/backend/src/models/step.ts b/packages/backend/src/models/step.ts index 329bc0c2..fc1d6c7c 100644 --- a/packages/backend/src/models/step.ts +++ b/packages/backend/src/models/step.ts @@ -27,13 +27,13 @@ class Step extends Base { properties: { id: { type: 'integer' }, flowId: { type: 'string' }, - key: { type: ['string', null] }, - appKey: { type: ['string', null], minLength: 1, maxLength: 255 }, + key: { type: ['string', 'null'] }, + appKey: { type: ['string', 'null'], minLength: 1, maxLength: 255 }, type: { type: 'string', enum: ['action', 'trigger'] }, - connectionId: { type: ['string', null] }, + connectionId: { type: ['string', 'null'] }, status: { type: 'string', enum: ['incomplete', 'completed'] }, position: { type: 'integer' }, - parameters: { type: ['object', null] }, + parameters: { type: 'object' }, }, };