@@ -172,6 +172,9 @@ type Query {
172172 getUserSnippets (userID : ID ! ): [Snippet ]
173173 getTopRatedSnippets (limit : Int ! ): [Snippet ]
174174 getSnippetComments (snippetID : ID ! ): [Comment ]
175+ searchSnippetsWithOptions (options : SearchOptions ! ): SearchResult
176+ getUserByUsername (username : String ! ): User
177+ getSnippetByTitle (title : String ! ): Snippet
175178 # Other queries
176179}
177180
@@ -181,50 +184,6 @@ input SnippetFilters {
181184 # Other filtering fields
182185}
183186
184- type Mutation {
185- createUser (input : CreateUserInput ! ): User
186- createSnippet (input : CreateSnippetInput ! ): Snippet
187- updateSnippet (id : ID ! , input : UpdateSnippetInput ! ): Snippet
188- deleteSnippet (id : ID ! ): Boolean
189- addTagToSnippet (snippetID : ID ! , tag : String ! ): Snippet
190- removeTagFromSnippet (snippetID : ID ! , tag : String ! ): Snippet
191- shareSnippet (snippetID : ID ! ): String
192- rateSnippet (snippetID : ID ! , rating : Int ! ): Snippet
193- createComment (snippetID : ID ! , text : String ! ): Comment
194- deleteComment (id : ID ! ): Boolean
195- flagComment (commentID : ID ! ): Comment
196- approveSnippet (snippetID : ID ! ): Snippet
197- createReview (snippetID : ID ! , rating : Int ! , text : String ! ): Review
198- updateReview (reviewID : ID ! , rating : Int ! , text : String ! ): Review
199- deleteReview (id : ID ! ): Boolean
200- addCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
201- removeCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
202- forkSnippet (snippetID : ID ! ): Snippet
203- tagSuggestion (snippetID : ID ! ): [String ]
204- # Other mutations
205- }
206- ```
207-
208- AND
209-
210- ```graphql
211- type Query {
212- # ... previous queries
213-
214- getUserByUsername (username : String ! ): User
215- getSnippetByTitle (title : String ! ): Snippet
216- }
217-
218- type Mutation {
219- # ... previous mutations
220-
221- deleteCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
222- createTag (tagName : String ! ): String
223- editUser (id : ID ! , input : EditUserInput ! ): User
224- editComment (id : ID ! , newText : String ! ): Comment
225- createFlaggedComment (snippetID : ID ! , text : String ! ): Comment
226- }
227-
228187input EditUserInput {
229188 username : String
230189 email : String
@@ -268,10 +227,32 @@ type SearchResult {
268227 totalCount : Int
269228}
270229
271- type Query {
272- # ... previous queries
273-
274- searchSnippetsWithOptions (options : SearchOptions ! ): SearchResult
230+ type Mutation {
231+ createUser (input : CreateUserInput ! ): User
232+ createSnippet (input : CreateSnippetInput ! ): Snippet
233+ updateSnippet (id : ID ! , input : UpdateSnippetInput ! ): Snippet
234+ deleteSnippet (id : ID ! ): Boolean
235+ addTagToSnippet (snippetID : ID ! , tag : String ! ): Snippet
236+ removeTagFromSnippet (snippetID : ID ! , tag : String ! ): Snippet
237+ shareSnippet (snippetID : ID ! ): String
238+ rateSnippet (snippetID : ID ! , rating : Int ! ): Snippet
239+ createComment (snippetID : ID ! , text : String ! ): Comment
240+ deleteComment (id : ID ! ): Boolean
241+ flagComment (commentID : ID ! ): Comment
242+ approveSnippet (snippetID : ID ! ): Snippet
243+ createReview (snippetID : ID ! , rating : Int ! , text : String ! ): Review
244+ updateReview (reviewID : ID ! , rating : Int ! , text : String ! ): Review
245+ deleteReview (id : ID ! ): Boolean
246+ addCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
247+ removeCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
248+ forkSnippet (snippetID : ID ! ): Snippet
249+ tagSuggestion (snippetID : ID ! ): [String ]
250+ deleteCollaborator (snippetID : ID ! , userID : ID ! ): Snippet
251+ createTag (tagName : String ! ): String
252+ editUser (id : ID ! , input : EditUserInput ! ): User
253+ editComment (id : ID ! , newText : String ! ): Comment
254+ createFlaggedComment (snippetID : ID ! , text : String ! ): Comment
255+ # Other mutations
275256}
276257```
277258
0 commit comments