mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
20 lines
604 B
JavaScript
20 lines
604 B
JavaScript
import createOrUpdateLocations from './nodes/locations'
|
|
import dotenv from 'dotenv'
|
|
|
|
dotenv.config()
|
|
|
|
export default {
|
|
Mutation: {
|
|
CreateUser: async (resolve, root, args, context, info) => {
|
|
const result = await resolve(root, args, context, info)
|
|
await createOrUpdateLocations(args.id, args.locationName, context.driver)
|
|
return result
|
|
},
|
|
UpdateUser: async (resolve, root, args, context, info) => {
|
|
const result = await resolve(root, args, context, info)
|
|
await createOrUpdateLocations(args.id, args.locationName, context.driver)
|
|
return result
|
|
}
|
|
}
|
|
}
|