Skip to content

Commit 6a0ede1

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main'
2 parents e747cd5 + 527d538 commit 6a0ede1

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,49 @@ The API comes with a suite of unit tests and integration tests. To run the tests
9191
phpunit
9292
```
9393

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+
94137
## cURL Testing
95138

96139
### Query: user(username: String!): User

0 commit comments

Comments
 (0)