Commit Graph

8 Commits

Author SHA1 Message Date
Alex Wright 56df8ebf3d Little rename 2021-07-11 16:11:54 +00:00
Alex Wright d2eda2fc7c List view!
The chain of lock().unwrap().values().map(closure).to_owned().collect()
is pretty gross, I think, but it went together pretty smoothly. Was
expecting more head bashing.
2021-07-11 15:37:25 +00:00
Alex Wright b8b8533f18 Rocket JSON isn't contrib anymore. Duh. 2021-07-11 15:30:55 +00:00
Alex Wright 9cca533a8c No idea why the versions are gone from .lock, but ok. 2021-07-11 15:29:41 +00:00
Alex Wright e73a55cfeb Failed attempt at rendering JSON for the rest view
I think something changed for rocket 0.5 becuase rustc is telling me:

```
the trait `Responder<'_, '_>` is not implemented for
  `rocket_contrib::json::Json<Person>`
```

Which I think doesn't make sense. It's their contrib wrapper over serde?
It's versioned ~.4 though so I think I need to bump that.
2021-07-11 15:14:40 +00:00
Alex Wright 591adcd000 Move routes into fairings 2021-07-11 14:25:52 +00:00
Alex Wright 015ecaff85 Little tidy up
That main.rs was getting long
2021-07-11 14:11:53 +00:00
Alex Wright b7211a77e4 This took most of today to get working.
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.
2021-07-11 13:33:02 +00:00