File tree Expand file tree Collapse file tree 2 files changed +18
-23
lines changed
packages/backend/src/graphql Expand file tree Collapse file tree 2 files changed +18
-23
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,21 @@ describe('updateStep mutation', () => {
2020
2121 // Helper to create step mock with flow
2222 const createStepMock = ( stepData : any = { } ) => ( {
23- findOne : vi . fn ( ) . mockReturnValue ( {
24- withGraphFetched : vi . fn ( ) . mockResolvedValue (
25- stepData === null
26- ? null
27- : {
28- id : mockStepId ,
29- key : 'sendTransactionalEmail' ,
30- appKey : 'postman' ,
31- status : 'completed' ,
32- flow : {
33- id : mockFlowId ,
34- } ,
35- patchFlowLastUpdated : patchFlowLastUpdatedSpy ,
36- ...stepData ,
23+ findOne : vi . fn ( ) . mockResolvedValue (
24+ stepData === null
25+ ? null
26+ : {
27+ id : mockStepId ,
28+ key : 'sendTransactionalEmail' ,
29+ appKey : 'postman' ,
30+ status : 'completed' ,
31+ flow : {
32+ id : mockFlowId ,
3733 } ,
38- ) ,
39- } ) ,
34+ patchFlowLastUpdated : patchFlowLastUpdatedSpy ,
35+ ...stepData ,
36+ } ,
37+ ) ,
4038 } )
4139
4240 // Helper to create connection mock
Original file line number Diff line number Diff line change @@ -13,13 +13,10 @@ const updateStep: MutationResolvers['updateStep'] = async (
1313 const step = await Step . transaction ( async ( trx ) => {
1414 await trx . raw ( 'SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;' )
1515
16- const step = await context . currentUser
17- . $relatedQuery ( 'steps' , trx )
18- . findOne ( {
19- 'steps.id' : input . id ,
20- flow_id : input . flow . id ,
21- } )
22- . withGraphFetched ( 'flow' )
16+ const step = await context . currentUser . $relatedQuery ( 'steps' , trx ) . findOne ( {
17+ 'steps.id' : input . id ,
18+ flow_id : input . flow . id ,
19+ } )
2320
2421 if ( ! step ) {
2522 throw new BadUserInputError ( 'Step not found' )
You can’t perform that action at this time.
0 commit comments