You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+140-4Lines changed: 140 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,17 +312,153 @@ query {
312
312
}
313
313
```
314
314
- Get user's favorite posts: Retrieve a list of blog posts marked as favorites by the currently logged-in user.
315
-
- Get recommended posts: Retrieve a list of recommended blog posts based on user preferences or behavior.
315
+
```graphql
316
+
query {
317
+
myFavorites {
318
+
post {
319
+
title
320
+
}
321
+
}
322
+
}
323
+
```
324
+
```json
325
+
{
326
+
"data": {
327
+
"myFavorites": []
328
+
}
329
+
}
330
+
```
316
331
- Get posts by category: Retrieve all blog posts belonging to a specific category.
332
+
```graphql
333
+
query {
334
+
category(id: 1) {
335
+
posts {
336
+
title
337
+
content
338
+
likes
339
+
views
340
+
isPublished
341
+
}
342
+
}
343
+
}
344
+
```
345
+
```json
346
+
{
347
+
"data": {
348
+
"category": {
349
+
"posts": [
350
+
{
351
+
"title": "pizza",
352
+
"content": "here we want to learn how make a pizza.",
353
+
"likes": 34,
354
+
"views": 2974,
355
+
"isPublished": true
356
+
},
357
+
{
358
+
"title": "moon and mars",
359
+
"content": "i want to be first person walked throught mars",
360
+
"likes": 0,
361
+
"views": 0,
362
+
"isPublished": true
363
+
}
364
+
]
365
+
}
366
+
}
367
+
}
368
+
```
317
369
- Get posts by tag: Retrieve all blog posts associated with a specific tag.
370
+
```graphql
371
+
query {
372
+
tag(id: 1) {
373
+
name
374
+
description
375
+
posts {
376
+
id
377
+
title
378
+
content
379
+
category {
380
+
name
381
+
}
382
+
likes
383
+
views
384
+
}
385
+
}
386
+
}
387
+
```
388
+
```json
389
+
{
390
+
"data": {
391
+
"tag": null
392
+
}
393
+
}
394
+
```
318
395
- Get total number of posts: Retrieve the total number of blog posts in the system.Get posts by author: Retrieve all blog posts written by a specific author.
396
+
```graphql
397
+
query {
398
+
countOfPosts
399
+
}
400
+
```
401
+
```json
402
+
{
403
+
"data": {
404
+
"countOfPosts": 2
405
+
}
406
+
}
407
+
```
319
408
- Get user by ID: Retrieve detailed information about a user by their ID.
320
-
- Get trending tags: Retrieve a list of the most popular tags used in blog posts.
321
-
- Get related posts: Retrieve a list of related blog posts based on the current post's tags or category.
322
-
- Get post comments count: Retrieve the total number of comments for a specific blog post.
0 commit comments