chore: remove redundant reset connection mutation

This commit is contained in:
Ali BARIN
2024-09-24 11:44:42 +00:00
parent 5e6f4bfb88
commit dc0273148c
5 changed files with 0 additions and 44 deletions

View File

@@ -1,14 +1,7 @@
// Converted mutations
import verifyConnection from './mutations/verify-connection.js';
import resetConnection from './mutations/reset-connection.js';
const mutationResolvers = {
resetConnection,
<<<<<<< HEAD
updateConnection,
=======
updateCurrentUser,
>>>>>>> 82cde73e (chore: remove redundant update connection mutation)
verifyConnection,
};

View File

@@ -1,22 +0,0 @@
const resetConnection = async (_parent, params, context) => {
context.currentUser.can('create', 'Connection');
let connection = await context.currentUser
.$relatedQuery('connections')
.findOne({
id: params.input.id,
})
.throwIfNotFound();
if (!connection.formattedData) {
return null;
}
connection = await connection.$query().patchAndFetch({
formattedData: { screenName: connection.formattedData.screenName },
});
return connection;
};
export default resetConnection;

View File

@@ -3,7 +3,6 @@ type Query {
}
type Mutation {
resetConnection(input: ResetConnectionInput): Connection
verifyConnection(input: VerifyConnectionInput): Connection
}
@@ -185,10 +184,6 @@ type SamlAuthProvidersRoleMapping {
remoteRoleName: String
}
input ResetConnectionInput {
id: String!
}
input VerifyConnectionInput {
id: String!
}