aboutsummaryrefslogtreecommitdiffstats
path: root/graphql/schema
diff options
context:
space:
mode:
Diffstat (limited to 'graphql/schema')
-rw-r--r--graphql/schema/label.graphql19
-rw-r--r--graphql/schema/repository.graphql11
-rw-r--r--graphql/schema/types.graphql8
3 files changed, 29 insertions, 9 deletions
diff --git a/graphql/schema/label.graphql b/graphql/schema/label.graphql
new file mode 100644
index 00000000..1205915c
--- /dev/null
+++ b/graphql/schema/label.graphql
@@ -0,0 +1,19 @@
+"""Label for a bug."""
+type Label {
+ """The name of the label."""
+ name: String!
+ """Color of the label."""
+ color: Color!
+}
+
+type LabelConnection {
+ edges: [LabelEdge!]!
+ nodes: [Label!]!
+ pageInfo: PageInfo!
+ totalCount: Int!
+}
+
+type LabelEdge {
+ cursor: String!
+ node: Label!
+} \ No newline at end of file
diff --git a/graphql/schema/repository.graphql b/graphql/schema/repository.graphql
index 0fb491e0..20a3cf0b 100644
--- a/graphql/schema/repository.graphql
+++ b/graphql/schema/repository.graphql
@@ -34,5 +34,14 @@ type Repository {
userIdentity: Identity
"""List of valid labels."""
- validLabels: [Label!]!
+ validLabels(
+ """Returns the elements in the list that come after the specified cursor."""
+ after: String
+ """Returns the elements in the list that come before the specified cursor."""
+ before: String
+ """Returns the first _n_ elements from the list."""
+ first: Int
+ """Returns the last _n_ elements from the list."""
+ last: Int
+ ): LabelConnection!
} \ No newline at end of file
diff --git a/graphql/schema/types.graphql b/graphql/schema/types.graphql
index fb94d1e8..0182885e 100644
--- a/graphql/schema/types.graphql
+++ b/graphql/schema/types.graphql
@@ -11,14 +11,6 @@ type Color {
B: Int!
}
-"""Label for a bug."""
-type Label {
- """The name of the label."""
- name: String!
- """Color of the label."""
- color: Color!
-}
-
"""Information about pagination in a connection."""
type PageInfo {
"""When paginating forwards, are there more items?"""