Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Sep 19, 2024
2 parents b96033c + 7f5f7b0 commit 6e3c30e
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions hasura/metadata/query_collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1472,29 +1472,6 @@
}
}
}
- name: Public - Query albums by creator id
query: |
query albums ($creator_id: Int!) {
albums(where: {creator_id:{_eq:$creator_id},show:{_eq:true}}, limit: 10, offset: 0) {
id
show
thumbnail_url
name
disable
}
albums_aggregate(where: {creator_id:{_eq:$creator_id},show:{_eq:true}}) {
aggregate {
count
}
}
default: albums_by_pk(id: 1) {
id
show
thumbnail_url
name
disable
}
}
- name: Public - Query album detail
query: |
query albums ($id: Int!, $limit: Int = 10, $offset: Int = 0) {
Expand All @@ -1516,3 +1493,19 @@
}
}
}
- name: Public - Query albums by creator id
query: |
query albums ($creator_id: Int!, $limit: Int = 100, $offset: Int = 0) {
albums(where: {_or:[{_and:{id:{_eq:1},show:{_eq:true}}},{_and:{creator_id:{_eq:$creator_id},show:{_eq:true}}}]}, limit: $limit, offset: $offset) {
id
show
thumbnail_url
name
disable
}
albums_aggregate(where: {_or:[{_and:{id:{_eq:1},show:{_eq:true}}},{_and:{creator_id:{_eq:$creator_id},show:{_eq:true}}}]}) {
aggregate {
count
}
}
}

0 comments on commit 6e3c30e

Please sign in to comment.