Skip to content

Commit

Permalink
feat(hasura): return contract address in manga api
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Sep 8, 2023
1 parent e753882 commit 7ef7a74
Showing 1 changed file with 72 additions and 71 deletions.
143 changes: 72 additions & 71 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,77 +549,6 @@
affected_rows
}
}
- name: Public - Get manga detail
query: |
query GetMangaReadingDetail ($id: Int = 1, $user_id: bpchar = "") {
manga(where: {_and:{id:{_eq:$id},status:{_neq:"Removed"}}}) {
id
poster
banner
status
release_date
manga_creators {
creator {
id
name
pen_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(limit: 5) {
tag {
id
tag_languages {
language_id
value
}
}
}
manga_subscribers(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
}
- name: Admin - Query creators
query: |
query QueryCreators {
Expand Down Expand Up @@ -793,3 +722,75 @@
}
}
}
- name: Public - Get manga detail
query: |
query GetMangaReadingDetail ($id: Int = 1, $user_id: bpchar = "") {
manga(where: {_and:{id:{_eq:$id},status:{_neq:"Removed"}}}) {
id
poster
banner
contract_addresses
status
release_date
manga_creators {
creator {
id
name
pen_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(limit: 5) {
tag {
id
tag_languages {
language_id
value
}
}
}
manga_subscribers(where: {user_id:{_eq:$user_id}}) {
id
created_at
}
}
}

0 comments on commit 7ef7a74

Please sign in to comment.