fix: make connectionId optional step model
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
3925de13a7
commit
da9ab8016b
@@ -45,7 +45,6 @@ const createStepResolver = async (
|
||||
key: input.key,
|
||||
appKey: input.appKey,
|
||||
type: 'action',
|
||||
connectionId: input.connection?.id,
|
||||
position: previousStep.position + 1,
|
||||
});
|
||||
|
||||
|
@@ -13,7 +13,7 @@ class Step extends Base {
|
||||
key: string;
|
||||
appKey: string;
|
||||
type!: StepEnumType;
|
||||
connectionId!: number;
|
||||
connectionId: number;
|
||||
position: number;
|
||||
parameters: any;
|
||||
|
||||
@@ -29,7 +29,7 @@ class Step extends Base {
|
||||
key: { type: ['string', null] },
|
||||
appKey: { type: 'string', minLength: 1, maxLength: 255 },
|
||||
type: { type: 'string', enum: ['action', 'trigger'] },
|
||||
connectionId: { type: 'integer' },
|
||||
connectionId: { type: ['integer', null] },
|
||||
position: { type: 'integer' },
|
||||
parameters: { type: ['object', null] },
|
||||
},
|
||||
|
@@ -53,7 +53,6 @@ export default function Editor(props: EditorProps): React.ReactElement {
|
||||
const mutationInput: Record<string, unknown> = {
|
||||
id: step.id,
|
||||
key: step.key,
|
||||
previousStepId: step.previousStepId,
|
||||
connection: {
|
||||
id: step.connection?.id
|
||||
},
|
||||
@@ -71,7 +70,9 @@ export default function Editor(props: EditorProps): React.ReactElement {
|
||||
|
||||
const addStep = React.useCallback((previousStepId) => {
|
||||
const mutationInput = {
|
||||
previousStepId: previousStepId,
|
||||
previousStep: {
|
||||
id: previousStepId,
|
||||
},
|
||||
flow: {
|
||||
id: flow.id,
|
||||
},
|
||||
|
Reference in New Issue
Block a user