33 GraphQLError ,
44 GraphQLInputObjectType ,
55 GraphQLNonNull ,
6- GraphQLObjectType
6+ GraphQLObjectType ,
77} from 'graphql'
88import setWebhookData from '../webhook/setWebhookData'
99import callModelWebhook from './callModelWebhook'
@@ -36,7 +36,7 @@ export default function generateMutationCreate(
3636 ...( graphqlModelDeclaration . create &&
3737 graphqlModelDeclaration . create . extraArg
3838 ? graphqlModelDeclaration . create . extraArg
39- : { } )
39+ : { } ) ,
4040 } ,
4141 resolve : async ( source : any , args : any , context : any , info : any ) => {
4242 let attributes = args [ modelName ]
@@ -99,7 +99,7 @@ export default function generateMutationCreate(
9999 let entityDuplicate = null
100100 if ( Object . keys ( filters ) . length ) {
101101 entityDuplicate = await model . findOne ( {
102- where : filters
102+ where : filters ,
103103 } )
104104 }
105105
@@ -138,7 +138,7 @@ export default function generateMutationCreate(
138138
139139 if ( pubSubInstance ) {
140140 pubSubInstance . publish ( `${ modelName } Created` , {
141- [ `${ modelName } Created` ] : updatedEntity . get ( )
141+ [ `${ modelName } Created` ] : updatedEntity . get ( ) ,
142142 } )
143143 }
144144
@@ -156,7 +156,7 @@ export default function generateMutationCreate(
156156
157157 if ( pubSubInstance ) {
158158 pubSubInstance . publish ( `${ modelName } Created` , {
159- [ `${ modelName } Created` ] : newEntity . get ( )
159+ [ `${ modelName } Created` ] : newEntity . get ( ) ,
160160 } )
161161 }
162162
@@ -170,6 +170,6 @@ export default function generateMutationCreate(
170170 )
171171
172172 return newEntity
173- }
173+ } ,
174174 }
175175}
0 commit comments