Skip to content

Commit

Permalink
Merge pull request #53 from ProjectAnni/feat/annim
Browse files Browse the repository at this point in the history
feat(annim): implement annim
  • Loading branch information
Yesterday17 authored Aug 25, 2024
2 parents 4de0f4e + caaeda8 commit 7ab51e2
Show file tree
Hide file tree
Showing 32 changed files with 4,307 additions and 308 deletions.
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

0 comments on commit 7ab51e2

Please sign in to comment.