Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(annim): implement annim #53

Merged
merged 28 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f811c8a
feat(annim): album schema
Yesterday17 Aug 17, 2024
86b6cfe
feat(annim): generate graphql schema
Yesterday17 Aug 17, 2024
1ef3657
feat(annim): query for album
Yesterday17 Aug 19, 2024
523b867
feat(annim): create and update album
Yesterday17 Aug 24, 2024
05c2d0f
feat(annim): create album with discs and tracks
Yesterday17 Aug 24, 2024
d1abcb7
feat(annim): working query and create album
Yesterday17 Aug 24, 2024
241930b
feat(annim): update metadata
Yesterday17 Aug 24, 2024
58341a5
feat(annim): add artists to track
Yesterday17 Aug 24, 2024
957c910
feat(annim): add created_at and updated_at
Yesterday17 Aug 24, 2024
fa02a03
refactor(app): add types.rs
Yesterday17 Aug 24, 2024
5a20dd7
feat(annim): album organize level
Yesterday17 Aug 24, 2024
447bf21
fix(annim): use UUID scalar for album_id
Yesterday17 Aug 24, 2024
68d7a89
feat(anni-metadata): simple client to fetch album from annim
Yesterday17 Aug 24, 2024
7be2884
feat(annim): tag tables
Yesterday17 Aug 24, 2024
0046187
feat(annim): tag query (untested)
Yesterday17 Aug 24, 2024
021b6aa
feat(annim): add extra to album table
Yesterday17 Aug 24, 2024
0322455
feat(annim): basic implementation of albums
Yesterday17 Aug 24, 2024
2da1e20
fix(annim): extra should not be required
Yesterday17 Aug 24, 2024
55ba628
feat(annim): add auth to all mutations
Yesterday17 Aug 24, 2024
79551cc
refactor(annim): rename
Yesterday17 Aug 25, 2024
558539e
feat(annim): cursor pagination
Yesterday17 Aug 25, 2024
424afd8
feat(annim): add level check for replace-* mutations
Yesterday17 Aug 25, 2024
fe58f3c
feat(annim): tag related operations
Yesterday17 Aug 25, 2024
252b14b
feat(annim): tag query
Yesterday17 Aug 25, 2024
50f3607
fix(annim): cascade delete foreign key
Yesterday17 Aug 25, 2024
f8d56ce
feat(annim): update_organize_level restrictions
Yesterday17 Aug 25, 2024
a83a679
feat(metadata): update schema
Yesterday17 Aug 25, 2024
caaeda8
feat(metadata): working album method
Yesterday17 Aug 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,506 changes: 1,430 additions & 76 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"anni-repo",
"anni-workspace",
"anni-playback",
"anni-metadata",
"third_party/google-drive3",
]
resolver = "2"
Expand All @@ -25,13 +26,13 @@ anni-common = { version = "0.2.0", path = "./anni-common" }

log = "0.4"
uuid = { version = "1", features = ["v4"] }
reqwest = { version = "0.11.15", features = [
"rustls",
reqwest = { version = "0.12", features = [
"rustls-tls",
], default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.7.3"
anyhow = { version = "1.0", features = ["backtrace"] }
anyhow = "1.0"
thiserror = "1.0"
once_cell = "1"

Expand Down
21 changes: 21 additions & 0 deletions anni-metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "anni-metadata"
version = "0.1.0"
edition.workspace = true
authors.workspace = true
repository.workspace = true
license.workspace = true

[dependencies]
anyhow.workspace = true
chrono = { version = "0.4.38", features = ["serde"] }
cynic = { version = "3", features = ["http-reqwest"] }
reqwest.workspace = true
serde_json.workspace = true
uuid = { workspace = true, features = ["serde"] }

[build-dependencies]
cynic-codegen = { version = "3" }

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
8 changes: 8 additions & 0 deletions anni-metadata/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# anni-metadata

## Update schema

```bash
cargo install --locked cynic-cli
cynic introspect http://localhost:8000/ -o schemas/annim.graphql
```
7 changes: 7 additions & 0 deletions anni-metadata/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
cynic_codegen::register_schema("annim")
.from_sdl_file("schemas/annim.graphql")
.unwrap()
.as_default()
.unwrap();
}
47 changes: 47 additions & 0 deletions anni-metadata/queries/album.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
fragment AlbumDetail on Album {
id
albumId
level

title
edition
catalog
artist

year
month
day

createdAt
updatedAt

discs {
id
index
title
catalog
artist

createdAt
updatedAt

tracks {
id
index
title
artist
artists
type

createdAt
updatedAt
}
}
}


query album($albumId: UUID) {
album(albumId: $albumId) {
...AlbumDetail
}
}
Loading
Loading