diff options
Diffstat (limited to 'app/assets/javascripts/sidebar/services/sidebar_service.js')
-rw-r--r-- | app/assets/javascripts/sidebar/services/sidebar_service.js | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/app/assets/javascripts/sidebar/services/sidebar_service.js b/app/assets/javascripts/sidebar/services/sidebar_service.js index beacdeb559c..00d3177b75a 100644 --- a/app/assets/javascripts/sidebar/services/sidebar_service.js +++ b/app/assets/javascripts/sidebar/services/sidebar_service.js @@ -1,15 +1,8 @@ -import sidebarDetailsIssueQuery from 'ee_else_ce/sidebar/queries/sidebar_details.query.graphql'; import { TYPE_USER } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import createGqClient, { fetchPolicies } from '~/lib/graphql'; import axios from '~/lib/utils/axios_utils'; import reviewerRereviewMutation from '../queries/reviewer_rereview.mutation.graphql'; -import sidebarDetailsMRQuery from '../queries/sidebar_details_mr.query.graphql'; - -const queries = { - merge_request: sidebarDetailsMRQuery, - issue: sidebarDetailsIssueQuery, -}; export const gqClient = createGqClient( {}, @@ -36,37 +29,13 @@ export default class SidebarService { } get() { - return Promise.all([ - axios.get(this.endpoint), - gqClient.query({ - query: this.sidebarDetailsQuery(), - variables: { - fullPath: this.fullPath, - iid: this.iid.toString(), - }, - }), - ]); - } - - sidebarDetailsQuery() { - return queries[this.issuableType]; + return axios.get(this.endpoint); } update(key, data) { return axios.put(this.endpoint, { [key]: data }); } - updateWithGraphQl(mutation, variables) { - return gqClient.mutate({ - mutation, - variables: { - ...variables, - projectPath: this.fullPath, - iid: this.iid.toString(), - }, - }); - } - getProjectsAutocomplete(searchTerm) { return axios.get(this.projectsAutocompleteEndpoint, { params: { |