refactoring delete models
This commit is contained in:
@@ -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?;
|
||||
|
||||
Reference in New Issue
Block a user