(id: ID)
| 55 | |
| 56 | #[appsync_operation(query(player))] |
| 57 | async fn get_player(id: ID) -> Result<Option<Player>, AppsyncError> { |
| 58 | Ok(Database.get(&id)) |
| 59 | } |
| 60 | |
| 61 | #[appsync_operation(mutation(createPlayer))] |
| 62 | async fn create_player(name: String) -> Result<Player, AppsyncError> { |