Skip to content

Commit

Permalink
fix(hasura): update api
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 25, 2023
1 parent 38a6bf1 commit 27c3e6e
Showing 1 changed file with 69 additions and 68 deletions.
137 changes: 69 additions & 68 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -469,74 +469,6 @@
bio
}
}
- name: Public - Get manga detail
query: |
query GetMangaReadingDetail ($id: Int = 1, $user_id: String = "") {
manga_by_pk(id: $id) {
id
poster
banner
manga_creators {
creator {
id
name
isActive
}
}
manga_total_likes {
likes
}
manga_total_views {
views
}
manga_languages {
title
description
is_main_language
language_id
}
chapters_aggregate {
aggregate {
count
}
}
chapters(order_by: {chapter_number:desc_nulls_last}, where: {status:{_neq:"Inactive"}}) {
id
chapter_number
chapter_name
chapter_type
thumbnail_url
pushlish_date
status
views
chapter_total_likes {
likes
}
chapters_likes(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
manga_subscribers_aggregate {
aggregate {
count
}
}
manga_tags {
tag {
id
tag_languages {
language_id
value
}
}
}
manga_subscribers(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
}
- name: Public - Get manga list by list id
query: |
query GetListMangaById ($id: [Int!]) {
Expand Down Expand Up @@ -782,3 +714,72 @@
}
}
}
- name: Public - Get manga detail
query: |
query GetMangaReadingDetail ($id: Int = 1, $user_id: String = "") {
manga(where: {_and:{id:{_eq:$id},status:{_neq:"Removed"}}}) {
id
poster
banner
status
manga_creators {
creator {
id
name
isActive
}
}
manga_total_likes {
likes
}
manga_total_views {
views
}
manga_languages {
title
description
is_main_language
language_id
}
chapters_aggregate {
aggregate {
count
}
}
chapters(order_by: {chapter_number:desc_nulls_last}, where: {status:{_neq:"Inactive"}}) {
id
chapter_number
chapter_name
chapter_type
thumbnail_url
pushlish_date
status
views
chapter_total_likes {
likes
}
chapters_likes(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
manga_subscribers_aggregate {
aggregate {
count
}
}
manga_tags {
tag {
id
tag_languages {
language_id
value
}
}
}
manga_subscribers(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
}

0 comments on commit 27c3e6e

Please sign in to comment.