refactoring delete models

This commit is contained in:
Peter Schiwy
2024-06-04 11:06:51 +02:00
parent 534d819865
commit 85f1840d7b
8 changed files with 95 additions and 104 deletions

View File

@@ -10,17 +10,6 @@ pub struct HerstellerQuery {
#[Object(extends)]
impl HerstellerQuery {
// #[graphql(external)]
// async fn id(&self) -> &i32 {
// &self.id
// }
// async fn modell<'a>(&self, ctx: &'a Context<'_>) -> FieldResult<Vec<Modell>> {
// let pool = ctx.data::<PgPool>().unwrap();
// let rows = Modell::read_by_typ(pool, &self.id).await?;
// Ok(rows)
// }
async fn alle_hersteller<'a>(&self, ctx: &'a Context<'_>) -> FieldResult<Vec<Hersteller>> {
let pool = ctx.data::<PgPool>()?;
let rows = Hersteller::read_all(pool).await?;