Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/routing/graphql_helper.rb')
-rw-r--r--app/helpers/routing/graphql_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/routing/graphql_helper.rb b/app/helpers/routing/graphql_helper.rb
new file mode 100644
index 00000000000..beefbb9b387
--- /dev/null
+++ b/app/helpers/routing/graphql_helper.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module Routing
+ module GraphqlHelper
+ def graphql_etag_pipeline_path(pipeline)
+ [api_graphql_path, "pipelines/id/#{pipeline.id}"].join(':')
+ end
+
+ def graphql_etag_pipeline_sha_path(sha)
+ [api_graphql_path, "pipelines/sha/#{sha}"].join(':')
+ end
+ end
+end