diff options
Diffstat (limited to 'app/assets/javascripts/pipeline_editor/graphql')
4 files changed, 5 insertions, 21 deletions
diff --git a/app/assets/javascripts/pipeline_editor/graphql/mutations/update_commit_sha.mutation.graphql b/app/assets/javascripts/pipeline_editor/graphql/mutations/update_commit_sha.mutation.graphql deleted file mode 100644 index dce17cad808..00000000000 --- a/app/assets/javascripts/pipeline_editor/graphql/mutations/update_commit_sha.mutation.graphql +++ /dev/null @@ -1,3 +0,0 @@ -mutation updateCommitSha($commitSha: String) { - updateCommitSha(commitSha: $commitSha) @client -} diff --git a/app/assets/javascripts/pipeline_editor/graphql/queries/client/commit_sha.graphql b/app/assets/javascripts/pipeline_editor/graphql/queries/client/commit_sha.graphql deleted file mode 100644 index 6c7635887ec..00000000000 --- a/app/assets/javascripts/pipeline_editor/graphql/queries/client/commit_sha.graphql +++ /dev/null @@ -1,3 +0,0 @@ -query getCommitSha { - commitSha @client -} diff --git a/app/assets/javascripts/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql b/app/assets/javascripts/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql index 219c23bb22b..02d49507947 100644 --- a/app/assets/javascripts/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql +++ b/app/assets/javascripts/pipeline_editor/graphql/queries/latest_commit_sha.query.graphql @@ -1,11 +1,10 @@ query getLatestCommitSha($projectPath: ID!, $ref: String) { project(fullPath: $projectPath) { - pipelines(ref: $ref) { - nodes { - id - sha - path - commitPath + repository { + tree(ref: $ref) { + lastCommit { + sha + } } } } diff --git a/app/assets/javascripts/pipeline_editor/graphql/resolvers.js b/app/assets/javascripts/pipeline_editor/graphql/resolvers.js index 2bec2006e95..a34652b1495 100644 --- a/app/assets/javascripts/pipeline_editor/graphql/resolvers.js +++ b/app/assets/javascripts/pipeline_editor/graphql/resolvers.js @@ -1,6 +1,5 @@ import produce from 'immer'; import axios from '~/lib/utils/axios_utils'; -import getCommitShaQuery from './queries/client/commit_sha.graphql'; import getCurrentBranchQuery from './queries/client/current_branch.graphql'; import getLastCommitBranchQuery from './queries/client/last_commit_branch.query.graphql'; @@ -32,14 +31,6 @@ export const resolvers = { __typename: 'CiLintContent', })); }, - updateCommitSha: (_, { commitSha }, { cache }) => { - cache.writeQuery({ - query: getCommitShaQuery, - data: produce(cache.readQuery({ query: getCommitShaQuery }), (draftData) => { - draftData.commitSha = commitSha; - }), - }); - }, updateCurrentBranch: (_, { currentBranch }, { cache }) => { cache.writeQuery({ query: getCurrentBranchQuery, |