summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/releases/graphql
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/releases/graphql')
-rw-r--r--app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql66
-rw-r--r--app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql23
-rw-r--r--app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql10
-rw-r--r--app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql5
-rw-r--r--app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql5
-rw-r--r--app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql5
-rw-r--r--app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql24
-rw-r--r--app/assets/javascripts/releases/graphql/queries/one_release.query.graphql9
-rw-r--r--app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql9
9 files changed, 156 insertions, 0 deletions
diff --git a/app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql b/app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql
new file mode 100644
index 00000000000..3a742db7d9e
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/fragments/release.fragment.graphql
@@ -0,0 +1,66 @@
+fragment Release on Release {
+ name
+ tagName
+ tagPath
+ descriptionHtml
+ releasedAt
+ createdAt
+ upcomingRelease
+ assets {
+ count
+ sources {
+ nodes {
+ format
+ url
+ }
+ }
+ links {
+ nodes {
+ id
+ name
+ url
+ directAssetUrl
+ linkType
+ external
+ }
+ }
+ }
+ evidences {
+ nodes {
+ filepath
+ collectedAt
+ sha
+ }
+ }
+ links {
+ editUrl
+ selfUrl
+ openedIssuesUrl
+ closedIssuesUrl
+ openedMergeRequestsUrl
+ mergedMergeRequestsUrl
+ closedMergeRequestsUrl
+ }
+ commit {
+ sha
+ webUrl
+ title
+ }
+ author {
+ webUrl
+ avatarUrl
+ username
+ }
+ milestones {
+ nodes {
+ id
+ title
+ description
+ webPath
+ stats {
+ totalIssuesCount
+ closedIssuesCount
+ }
+ }
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql b/app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql
new file mode 100644
index 00000000000..47c5afefd78
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/fragments/release_for_editing.fragment.graphql
@@ -0,0 +1,23 @@
+fragment ReleaseForEditing on Release {
+ name
+ tagName
+ description
+ assets {
+ links {
+ nodes {
+ id
+ name
+ url
+ linkType
+ }
+ }
+ }
+ links {
+ selfUrl
+ }
+ milestones {
+ nodes {
+ title
+ }
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql
new file mode 100644
index 00000000000..56bfe7c23d6
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/mutations/create_release.mutation.graphql
@@ -0,0 +1,10 @@
+mutation createRelease($input: ReleaseCreateInput!) {
+ releaseCreate(input: $input) {
+ release {
+ links {
+ selfUrl
+ }
+ }
+ errors
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql
new file mode 100644
index 00000000000..4bdfc79dbc4
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/mutations/create_release_link.mutation.graphql
@@ -0,0 +1,5 @@
+mutation createReleaseAssetLink($input: ReleaseAssetLinkCreateInput!) {
+ releaseAssetLinkCreate(input: $input) {
+ errors
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql
new file mode 100644
index 00000000000..a75eddcd288
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/mutations/delete_release_link.mutation.graphql
@@ -0,0 +1,5 @@
+mutation deleteReleaseAssetLink($input: ReleaseAssetLinkDeleteInput!) {
+ releaseAssetLinkDelete(input: $input) {
+ errors
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql b/app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql
new file mode 100644
index 00000000000..9c6a861d2f1
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/mutations/update_release.mutation.graphql
@@ -0,0 +1,5 @@
+mutation updateRelease($input: ReleaseUpdateInput!) {
+ releaseUpdate(input: $input) {
+ errors
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql b/app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql
new file mode 100644
index 00000000000..10e4d883e62
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/queries/all_releases.query.graphql
@@ -0,0 +1,24 @@
+#import "../fragments/release.fragment.graphql"
+
+query allReleases(
+ $fullPath: ID!
+ $first: Int
+ $last: Int
+ $before: String
+ $after: String
+ $sort: ReleaseSort
+) {
+ project(fullPath: $fullPath) {
+ releases(first: $first, last: $last, before: $before, after: $after, sort: $sort) {
+ nodes {
+ ...Release
+ }
+ pageInfo {
+ startCursor
+ hasPreviousPage
+ hasNextPage
+ endCursor
+ }
+ }
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/queries/one_release.query.graphql b/app/assets/javascripts/releases/graphql/queries/one_release.query.graphql
new file mode 100644
index 00000000000..c80d6e753ab
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/queries/one_release.query.graphql
@@ -0,0 +1,9 @@
+#import "../fragments/release.fragment.graphql"
+
+query oneRelease($fullPath: ID!, $tagName: String!) {
+ project(fullPath: $fullPath) {
+ release(tagName: $tagName) {
+ ...Release
+ }
+ }
+}
diff --git a/app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql b/app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql
new file mode 100644
index 00000000000..767ba4aeca0
--- /dev/null
+++ b/app/assets/javascripts/releases/graphql/queries/one_release_for_editing.query.graphql
@@ -0,0 +1,9 @@
+#import "../fragments/release_for_editing.fragment.graphql"
+
+query oneReleaseForEditing($fullPath: ID!, $tagName: String!) {
+ project(fullPath: $fullPath) {
+ release(tagName: $tagName) {
+ ...ReleaseForEditing
+ }
+ }
+}