Playing with Rust, Rocket, Juniper.
GraphQL interface to a list of names.. to can query by id, and can add names. There's no dupe check, no remove/delete, not even a way to enumerate stored values. The trickiest part of the incrementing id for addPerson. Initially I reused some of the HashMap in a Mutex pattern to store u32s, well u8 at first but that doesn't cast to a juniper scalar type. I don't know why that didn't work. The incremented value didn't seem to persist in the hash. |
||
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||