From d04f2be14dc23606353acf9b1bbc6326e40d7f4b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 23 Jun 2021 18:07:10 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../graphql/queries/blob_content.graphql | 12 +++-- .../pipeline_editor/graphql/resolvers.js | 11 ----- .../pipeline_editor/pipeline_editor_app.vue | 55 +++++++++++----------- 3 files changed, 37 insertions(+), 41 deletions(-) (limited to 'app/assets/javascripts/pipeline_editor') diff --git a/app/assets/javascripts/pipeline_editor/graphql/queries/blob_content.graphql b/app/assets/javascripts/pipeline_editor/graphql/queries/blob_content.graphql index 9f1b5b13088..5500244b430 100644 --- a/app/assets/javascripts/pipeline_editor/graphql/queries/blob_content.graphql +++ b/app/assets/javascripts/pipeline_editor/graphql/queries/blob_content.graphql @@ -1,5 +1,11 @@ -query getBlobContent($projectPath: ID!, $path: String, $ref: String!) { - blobContent(projectPath: $projectPath, path: $path, ref: $ref) @client { - rawData +query getBlobContent($projectPath: ID!, $path: String!, $ref: String) { + project(fullPath: $projectPath) { + repository { + blobs(paths: [$path], ref: $ref) { + nodes { + rawBlob + } + } + } } } diff --git a/app/assets/javascripts/pipeline_editor/graphql/resolvers.js b/app/assets/javascripts/pipeline_editor/graphql/resolvers.js index 8cead7f3315..ad333f6d42a 100644 --- a/app/assets/javascripts/pipeline_editor/graphql/resolvers.js +++ b/app/assets/javascripts/pipeline_editor/graphql/resolvers.js @@ -1,20 +1,9 @@ import produce from 'immer'; -import Api from '~/api'; import axios from '~/lib/utils/axios_utils'; import getCurrentBranchQuery from './queries/client/current_branch.graphql'; import getLastCommitBranchQuery from './queries/client/last_commit_branch.query.graphql'; export const resolvers = { - Query: { - blobContent(_, { projectPath, path, ref }) { - return { - __typename: 'BlobContent', - rawData: Api.getRawFile(projectPath, path, { ref }).then(({ data }) => { - return data; - }), - }; - }, - }, Mutation: { lintCI: (_, { endpoint, content, dry_run }) => { return axios.post(endpoint, { content, dry_run }).then(({ data }) => ({ diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue index c24e6523352..452420314ed 100644 --- a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue +++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue @@ -1,7 +1,6 @@