forge-codegen 0.10.2

TypeScript code generator for the Forge framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use forge::prelude::*;

#[derive(Serialize, Deserialize)]
pub struct AvatarInput {
    pub name: String,
    pub file: Upload,
}

#[forge::mutation(auth = "none")]
pub async fn upload_avatar(ctx: &MutationContext, input: AvatarInput) -> Result<String> {
    Ok("ok".into())
}

#[forge::mutation(auth = "none")]
pub async fn upload_file(ctx: &MutationContext, file: Upload) -> Result<String> {
    Ok("ok".into())
}