Skip to content

Commit 2d1bb05

Browse files
committed
frontend: update schema.graphql to that generated by graphene
1 parent 8415222 commit 2d1bb05

13 files changed

+65
-31
lines changed

frontend/data/schema.graphql

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
schema {
2+
query: Query
3+
mutation: Mutation
4+
}
5+
16
input AddTodoInput {
27
text: String!
38
clientMutationId: String
@@ -41,35 +46,24 @@ type Mutation {
4146
renameTodo(input: RenameTodoInput!): RenameTodoPayload
4247
}
4348

44-
"""An object with an ID"""
4549
interface Node {
46-
"""The id of the object."""
4750
id: ID!
4851
}
4952

50-
"""Information about pagination in a connection."""
5153
type PageInfo {
52-
"""When paginating forwards, are there more items?"""
5354
hasNextPage: Boolean!
54-
55-
"""When paginating backwards, are there more items?"""
5655
hasPreviousPage: Boolean!
57-
58-
"""When paginating backwards, the cursor to continue."""
5956
startCursor: String
60-
61-
"""When paginating forwards, the cursor to continue."""
6257
endCursor: String
6358
}
6459

6560
type Query {
61+
node(id: ID!): Node
6662
viewer: User
67-
68-
"""Fetches an object given its ID"""
69-
node(
70-
"""The ID of an object"""
71-
id: ID!
72-
): Node
63+
user(id: ID!): User
64+
todo(id: ID!): Todo
65+
allUsers(sort: [UserSortEnum] = [ID_ASC], before: String, after: String, first: Int, last: Int): UserConnection
66+
allTodos(sort: [TodoSortEnum] = [ID_ASC], before: String, after: String, first: Int, last: Int): TodoConnection
7367
}
7468

7569
input RemoveCompletedTodosInput {
@@ -105,34 +99,55 @@ type RenameTodoPayload {
10599
}
106100

107101
type Todo implements Node {
108-
"""The ID of an object"""
109102
id: ID!
110-
text: String
111103
complete: Boolean
104+
text: String
105+
userId: Int
106+
user: User
112107
}
113108

114-
"""A connection to a list of items."""
115109
type TodoConnection {
116-
"""Information to aid in pagination."""
117110
pageInfo: PageInfo!
118-
119-
"""A list of edges."""
120-
edges: [TodoEdge]
111+
edges: [TodoEdge]!
121112
}
122113

123-
"""An edge in a connection."""
124114
type TodoEdge {
125-
"""The item at the end of the edge"""
126115
node: Todo
127-
128-
"""A cursor for use in pagination"""
129116
cursor: String!
130117
}
131118

119+
enum TodoSortEnum {
120+
ID_ASC
121+
ID_DESC
122+
COMPLETE_ASC
123+
COMPLETE_DESC
124+
TEXT_ASC
125+
TEXT_DESC
126+
USER_ID_ASC
127+
USER_ID_DESC
128+
}
129+
132130
type User implements Node {
133-
"""The ID of an object"""
134131
id: ID!
135-
todos(status: String = "any", after: String, first: Int, before: String, last: Int): TodoConnection
132+
name: String
133+
todos(status: String = "any", before: String, after: String, first: Int, last: Int): TodoConnection
136134
totalCount: Int
137135
completedCount: Int
138136
}
137+
138+
type UserConnection {
139+
pageInfo: PageInfo!
140+
edges: [UserEdge]!
141+
}
142+
143+
type UserEdge {
144+
node: User
145+
cursor: String!
146+
}
147+
148+
enum UserSortEnum {
149+
ID_ASC
150+
ID_DESC
151+
NAME_ASC
152+
NAME_DESC
153+
}

frontend/ts/__relay_artifacts__/AddTodoMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash 4b12b1e3640d316bc23975fe4ed30188 */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type AddTodoInput = {

frontend/ts/__relay_artifacts__/ChangeTodoStatusMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash 118160555919ad5b514b36cced45e3a7 */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type ChangeTodoStatusInput = {

frontend/ts/__relay_artifacts__/MarkAllTodosMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash edf858c41a0df9298b4a6e1f7d245989 */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type MarkAllTodosInput = {

frontend/ts/__relay_artifacts__/RemoveCompletedTodosMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash d2a53ba3ae88b46d9efe504fd7f51ffe */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type RemoveCompletedTodosInput = {

frontend/ts/__relay_artifacts__/RemoveTodoMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash 6614ef003d693035b559a5b47f6502ce */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type RemoveTodoInput = {

frontend/ts/__relay_artifacts__/RenameTodoMutation.graphql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* tslint:disable */
2+
/* eslint-disable */
3+
/* @relayHash dc265880c97ca1c03fea48c17055e746 */
24

35
import { ConcreteRequest } from "relay-runtime";
46
export type RenameTodoInput = {

frontend/ts/__relay_artifacts__/TodoApp_viewer.graphql.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* tslint:disable */
2+
/* eslint-disable */
23

34
import { ReaderFragment } from "relay-runtime";
45
import { FragmentRefs } from "relay-runtime";

frontend/ts/__relay_artifacts__/TodoListFooter_viewer.graphql.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* tslint:disable */
2+
/* eslint-disable */
23

34
import { ReaderFragment } from "relay-runtime";
45
import { FragmentRefs } from "relay-runtime";
@@ -11,7 +12,7 @@ export type TodoListFooter_viewer = {
1112
readonly id: string;
1213
readonly complete: boolean | null;
1314
} | null;
14-
} | null> | null;
15+
} | null>;
1516
} | null;
1617
readonly totalCount: number | null;
1718
readonly " $refType": "TodoListFooter_viewer";

frontend/ts/__relay_artifacts__/TodoList_viewer.graphql.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* tslint:disable */
2+
/* eslint-disable */
23

34
import { ReaderFragment } from "relay-runtime";
45
import { FragmentRefs } from "relay-runtime";
@@ -10,7 +11,7 @@ export type TodoList_viewer = {
1011
readonly complete: boolean | null;
1112
readonly " $fragmentRefs": FragmentRefs<"Todo_todo">;
1213
} | null;
13-
} | null> | null;
14+
} | null>;
1415
} | null;
1516
readonly id: string;
1617
readonly totalCount: number | null;

0 commit comments

Comments
 (0)