Mutation to update the session
This commit is contained in:
1 parent
14bde55009
commit
9e6aa92688
1 file changed
+20
@@ -283,6 +283,26 @@ const Mutation = new GraphQLObjectType({
|
||||
referrerId: args.referrerId
|
||||
}
|
||||
|
||||
return User.update(key, updatedUser)
|
||||
}
|
||||
},
|
||||
updateSessionToken: {
|
||||
type: UserType,
|
||||
args: {
|
||||
authId: {type: GraphQLString},
|
||||
sessionToken: {type: GraphQLString}
|
||||
},
|
||||
resolve (parent, args) {
|
||||
console.log('Request Received', args)
|
||||
let key = {
|
||||
authId: decodeURI(args.authId)
|
||||
}
|
||||
console.log('Key', key)
|
||||
console.log('decode', decodeURI(args.authId))
|
||||
let updatedUser = {
|
||||
sessionToken: args.sessionToken
|
||||
}
|
||||
|
||||
return User.update(key, updatedUser)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user