File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,49 @@ The API comes with a suite of unit tests and integration tests. To run the tests
91
91
phpunit
92
92
```
93
93
94
+ ## GraphQL Models
95
+
96
+ ``` graphql
97
+ type User {
98
+ id : ID !
99
+ username : String !
100
+ name : String !
101
+ }
102
+
103
+ type Tweet {
104
+ id : ID !
105
+ text : String !
106
+ author : User !
107
+ }
108
+
109
+ input CreateUserInput {
110
+ username : String !
111
+ password : String !
112
+ name : String !
113
+ }
114
+
115
+ input CreateTweetInput {
116
+ text : String !
117
+ }
118
+
119
+ type Query {
120
+ user (username : String ! ): User
121
+ tweet (id : ID ! ): Tweet
122
+ timeline (userId : ID ! ): [Tweet ! ]!
123
+ }
124
+
125
+ type Mutation {
126
+ createUser (input : CreateUserInput ! ): User
127
+ createTweet (input : CreateTweetInput ! ): Tweet
128
+ followUser (userId : ID ! ): User
129
+ unfollowUser (userId : ID ! ): User
130
+ likeTweet (tweetId : ID ! ): Tweet
131
+ unlikeTweet (tweetId : ID ! ): Tweet
132
+ retweet (tweetId : ID ! ): Tweet
133
+ deleteTweet (tweetId : ID ! ): Boolean
134
+ }
135
+ ```
136
+
94
137
## cURL Testing
95
138
96
139
### Query: user(username: String!): User
You can’t perform that action at this time.
0 commit comments