We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 802d73a commit 1c9f7a0Copy full SHA for 1c9f7a0
graphql/src/schema/library.rs
@@ -103,8 +103,14 @@ impl LibraryQuery {
103
.collect());
104
}
105
106
- let db = ctx.data::<Database>().unwrap();
107
- let results = ArtistRepository::new(db.get_connection());
+ let db = ctx.data::<Database>().unwrap();
+
108
+ let results = ArtistRepository::new(db.get_connection())
109
+ .find_all(filter, offset.map(|x| x as u64), limit.map(|x| x as u64))
110
+ .await?;
111
112
+ Ok(results.into_iter().map(Into::into).collect())
113
+ }
114
115
async fn albums(
116
&self,
@@ -143,6 +149,7 @@ impl LibraryQuery {
143
149
144
150
145
151
let db = ctx.data::<Database>().unwrap();
152
146
153
let results = AlbumRepository::new(db.get_connection())
147
154
.find_all(filter, offset.map(|x| x as u64), limit.map(|x| x as u64))
148
155
.await?;
0 commit comments