summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repository/queries
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repository/queries')
-rw-r--r--app/assets/javascripts/repository/queries/blob_controls.query.graphql18
-rw-r--r--app/assets/javascripts/repository/queries/blob_info.query.graphql16
-rw-r--r--app/assets/javascripts/repository/queries/path_locks.fragment.graphql3
3 files changed, 26 insertions, 11 deletions
diff --git a/app/assets/javascripts/repository/queries/blob_controls.query.graphql b/app/assets/javascripts/repository/queries/blob_controls.query.graphql
new file mode 100644
index 00000000000..fc1cf5f254b
--- /dev/null
+++ b/app/assets/javascripts/repository/queries/blob_controls.query.graphql
@@ -0,0 +1,18 @@
+query getBlobControls($projectPath: ID!, $filePath: String!, $ref: String!) {
+ project(fullPath: $projectPath) {
+ id
+ repository {
+ blobs(paths: [$filePath], ref: $ref) {
+ nodes {
+ id
+ findFilePath
+ blamePath
+ historyPath
+ permalinkPath
+ storedExternally
+ externalStorage
+ }
+ }
+ }
+ }
+}
diff --git a/app/assets/javascripts/repository/queries/blob_info.query.graphql b/app/assets/javascripts/repository/queries/blob_info.query.graphql
index 45d1ba80917..ae20a0f0bc4 100644
--- a/app/assets/javascripts/repository/queries/blob_info.query.graphql
+++ b/app/assets/javascripts/repository/queries/blob_info.query.graphql
@@ -1,22 +1,14 @@
+#import "ee_else_ce/repository/queries/path_locks.fragment.graphql"
+
query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) {
project(fullPath: $projectPath) {
- id
userPermissions {
pushCode
downloadCode
createMergeRequestIn
forkProject
}
- pathLocks {
- nodes {
- id
- path
- user {
- id
- username
- }
- }
- }
+ ...ProjectPathLocksFragment
repository {
empty
blobs(paths: [$filePath], ref: $ref) {
@@ -35,7 +27,9 @@ query getBlobInfo($projectPath: ID!, $filePath: String!, $ref: String!) {
ideForkAndEditPath
canModifyBlob
canCurrentUserPushToBranch
+ archived
storedExternally
+ externalStorage
rawPath
replacePath
pipelineEditorPath
diff --git a/app/assets/javascripts/repository/queries/path_locks.fragment.graphql b/app/assets/javascripts/repository/queries/path_locks.fragment.graphql
new file mode 100644
index 00000000000..868a513362d
--- /dev/null
+++ b/app/assets/javascripts/repository/queries/path_locks.fragment.graphql
@@ -0,0 +1,3 @@
+fragment ProjectPathLocksFragment on Project {
+ id
+}