MCPcopy Create free account
hub / github.com/actix/examples / create_human

Method create_human

graphql/juniper/src/schema.rs:47–54  ·  view source on GitHub ↗
(new_human: NewHuman)

Source from the content-addressed store, hash-verified

45#[juniper::graphql_object]
46impl MutationRoot {
47 fn create_human(new_human: NewHuman) -> FieldResult<Human> {
48 Ok(Human {
49 id: "1234".to_owned(),
50 name: new_human.name,
51 appears_in: new_human.appears_in,
52 home_planet: new_human.home_planet,
53 })
54 }
55}
56
57pub type Schema = RootNode<'static, QueryRoot, MutationRoot, EmptySubscription>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected