Skip to content

Commit

Permalink
feat(hasura): update query all manga api
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 10, 2023
1 parent 00a04bb commit a47e0ac
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
48 changes: 25 additions & 23 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,6 @@
updated_at
}
}
- name: Admin - Query List Manga
query: |
query QueryListManga {
manga(order_by: {manga_languages_aggregate:{min:{title:asc}}}) {
id
status
release_date
manga_creators {
creator {
name
}
}
chapters_aggregate {
aggregate {
count
}
}
manga_languages(where: {is_main_language:{_eq:true}}) {
id
title
}
}
}
- name: Admin - Deactive Manga
query: |
mutation DeactiveManga ($id: Int = 10) {
Expand Down Expand Up @@ -588,3 +565,28 @@
action_type
}
}
- name: Admin - Query List Manga
query: |
query QueryListManga {
manga(order_by: {created_at:desc}) {
id
status
release_date
publish_date
created_at
manga_creators {
creator {
name
}
}
chapters_aggregate {
aggregate {
count
}
}
manga_languages(where: {is_main_language:{_eq:true}}) {
id
title
}
}
}
12 changes: 6 additions & 6 deletions hasura/metadata/rest_endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@
definition:
query:
collection_name: allowed-queries
query_name: Admin - Query List Manga
query_name: Admin - Create Manga
methods:
- GET
name: Admin - Query List Manga
- POST
name: Admin - Create Manga
url: admin/manga
- comment: ""
definition:
query:
collection_name: allowed-queries
query_name: Admin - Create Manga
query_name: Admin - Query List Manga
methods:
- POST
name: Admin - Create Manga
- GET
name: Admin - Query List Manga
url: admin/manga
- comment: ""
definition:
Expand Down

0 comments on commit a47e0ac

Please sign in to comment.