feat: refactor update-current-user mutation with the REST API endpoint
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// Converted mutations
|
||||
import verifyConnection from './mutations/verify-connection.js';
|
||||
import updateCurrentUser from './mutations/update-current-user.js';
|
||||
import generateAuthUrl from './mutations/generate-auth-url.js';
|
||||
import resetConnection from './mutations/reset-connection.js';
|
||||
import updateConnection from './mutations/update-connection.js';
|
||||
@@ -9,7 +8,6 @@ const mutationResolvers = {
|
||||
generateAuthUrl,
|
||||
resetConnection,
|
||||
updateConnection,
|
||||
updateCurrentUser,
|
||||
verifyConnection,
|
||||
};
|
||||
|
||||
|
@@ -1,11 +0,0 @@
|
||||
const updateCurrentUser = async (_parent, params, context) => {
|
||||
const user = await context.currentUser.$query().patchAndFetch({
|
||||
email: params.input.email,
|
||||
password: params.input.password,
|
||||
fullName: params.input.fullName,
|
||||
});
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
export default updateCurrentUser;
|
@@ -5,7 +5,6 @@ type Mutation {
|
||||
generateAuthUrl(input: GenerateAuthUrlInput): AuthLink
|
||||
resetConnection(input: ResetConnectionInput): Connection
|
||||
updateConnection(input: UpdateConnectionInput): Connection
|
||||
updateCurrentUser(input: UpdateCurrentUserInput): User
|
||||
verifyConnection(input: VerifyConnectionInput): Connection
|
||||
}
|
||||
|
||||
@@ -223,12 +222,6 @@ input UserRoleInput {
|
||||
id: String
|
||||
}
|
||||
|
||||
input UpdateCurrentUserInput {
|
||||
email: String
|
||||
password: String
|
||||
fullName: String
|
||||
}
|
||||
|
||||
"""
|
||||
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
||||
"""
|
||||
|
Reference in New Issue
Block a user