chore: remove redundant reset connection mutation
This commit is contained in:
@@ -1,14 +1,7 @@
|
|||||||
// Converted mutations
|
// Converted mutations
|
||||||
import verifyConnection from './mutations/verify-connection.js';
|
import verifyConnection from './mutations/verify-connection.js';
|
||||||
import resetConnection from './mutations/reset-connection.js';
|
|
||||||
|
|
||||||
const mutationResolvers = {
|
const mutationResolvers = {
|
||||||
resetConnection,
|
|
||||||
<<<<<<< HEAD
|
|
||||||
updateConnection,
|
|
||||||
=======
|
|
||||||
updateCurrentUser,
|
|
||||||
>>>>>>> 82cde73e (chore: remove redundant update connection mutation)
|
|
||||||
verifyConnection,
|
verifyConnection,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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;
|
|
@@ -3,7 +3,6 @@ type Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Mutation {
|
type Mutation {
|
||||||
resetConnection(input: ResetConnectionInput): Connection
|
|
||||||
verifyConnection(input: VerifyConnectionInput): Connection
|
verifyConnection(input: VerifyConnectionInput): Connection
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,10 +184,6 @@ type SamlAuthProvidersRoleMapping {
|
|||||||
remoteRoleName: String
|
remoteRoleName: String
|
||||||
}
|
}
|
||||||
|
|
||||||
input ResetConnectionInput {
|
|
||||||
id: String!
|
|
||||||
}
|
|
||||||
|
|
||||||
input VerifyConnectionInput {
|
input VerifyConnectionInput {
|
||||||
id: String!
|
id: String!
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
import { VERIFY_CONNECTION } from './verify-connection';
|
import { VERIFY_CONNECTION } from './verify-connection';
|
||||||
import { RESET_CONNECTION } from './reset-connection';
|
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
verifyConnection: VERIFY_CONNECTION,
|
verifyConnection: VERIFY_CONNECTION,
|
||||||
resetConnection: RESET_CONNECTION,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default mutations;
|
export default mutations;
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
import { gql } from '@apollo/client';
|
|
||||||
export const RESET_CONNECTION = gql`
|
|
||||||
mutation ResetConnection($input: ResetConnectionInput) {
|
|
||||||
resetConnection(input: $input) {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
Reference in New Issue
Block a user