File tree Expand file tree Collapse file tree 1 file changed +77
-8
lines changed Expand file tree Collapse file tree 1 file changed +77
-8
lines changed Original file line number Diff line number Diff line change 1
1
interface Node {
2
- id : ID !
3
- }
2
+ id : ID !
3
+ }
4
4
5
- type Query {
6
- hello : String
7
- }
5
+ type Query {
6
+ node (id : ID ! ): Node
7
+ projects (first : Int , after : String ): ProjectConnection !
8
+ project (id : ID ! ): Project
9
+ users (first : Int , after : String ): UserConnection !
10
+ user (id : ID ! ): User
11
+ }
8
12
9
- type Mutation {
10
- say (input : String ! ): String !
11
- }
13
+ type Mutation {
14
+ createProject (input : CreateProjectInput ! ): CreateProjectPayload !
15
+ updateProject (id : ID ! , input : UpdateProjectInput ! ): UpdateProjectPayload !
16
+ deleteProject (id : ID ! ): DeleteProjectPayload !
17
+ }
18
+
19
+ type Project implements Node {
20
+ id : ID !
21
+ title : String !
22
+ description : String
23
+ createdAt : String !
24
+ updatedAt : String !
25
+ owner : User !
26
+ }
27
+
28
+ type User implements Node {
29
+ id : ID !
30
+ username : String !
31
+ email : String !
32
+ projects (first : Int , after : String ): ProjectConnection !
33
+ }
34
+
35
+ type ProjectConnection {
36
+ edges : [ProjectEdge ! ]!
37
+ pageInfo : PageInfo !
38
+ }
39
+
40
+ type ProjectEdge {
41
+ cursor : String !
42
+ node : Project !
43
+ }
44
+
45
+ type UserConnection {
46
+ edges : [UserEdge ! ]!
47
+ pageInfo : PageInfo !
48
+ }
49
+
50
+ type UserEdge {
51
+ cursor : String !
52
+ node : User ! ;
53
+ }
54
+
55
+ type PageInfo {
56
+ hasNextPage : Boolean !
57
+ endCursor : String
58
+ }
59
+
60
+ input CreateProjectInput {
61
+ title : String !
62
+ description : String
63
+ }
64
+
65
+ type CreateProjectPayload {
66
+ project : Project ! ;
67
+ }
68
+
69
+ input UpdateProjectInput {
70
+ title : String
71
+ description : String
72
+ }
73
+
74
+ type UpdateProjectPayload {
75
+ project : Project ! ;
76
+ }
77
+
78
+ type DeleteProjectPayload {
79
+ success : Boolean ! ;
80
+ }
You can’t perform that action at this time.
0 commit comments