Skip to content

Commit

Permalink
feat(hasura): limit 4 manga on trending
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 26, 2023
1 parent c02c6e6 commit 77df132
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,39 +591,6 @@
}
}
}
- name: Public - Get trending manga
query: |
query GetTrendingManga {
manga(order_by: {manga_total_views:{views:desc_nulls_last}}, limit: 10, where: {status:{_neq:"Removed"}}) {
id
chapters(limit: 1, order_by: {updated_at:desc}, where: {status:{_eq:"Published"}}) {
id
chapter_number
updated_at
}
manga_total_likes {
likes
}
manga_total_views {
views
}
manga_languages {
title
language_id
is_main_language
description
}
banner
poster
manga_creators {
creator {
name
id
isActive
}
}
}
}
- name: Public - Get manga detail
query: |
query GetMangaReadingDetail ($id: Int = 1, $user_id: String = "") {
Expand Down Expand Up @@ -835,3 +802,36 @@
}
}
}
- name: Public - Get trending manga
query: |
query GetTrendingManga {
manga(order_by: {manga_total_views:{views:desc_nulls_last}}, limit: 4, where: {status:{_neq:"Removed"}}) {
id
chapters(limit: 1, order_by: {updated_at:desc}, where: {status:{_eq:"Published"}}) {
id
chapter_number
updated_at
}
manga_total_likes {
likes
}
manga_total_views {
views
}
manga_languages {
title
language_id
is_main_language
description
}
banner
poster
manga_creators {
creator {
name
id
isActive
}
}
}
}

0 comments on commit 77df132

Please sign in to comment.