Add history to the graphql API
Closed this issue · 2 comments
NunoSempere commented
Right now, history isn't yet added to the graphql API. But it seems like a natural next step.
berekuk commented
I'm not sure if this is the best approach in terms of API design & implementation, but it's the easiest one for now. Probably going to be too slow if we'll want to serve history graphs for a page full of different questions, but good enough for a single question's page. I haven't tried to benchmark it yet.
Other notes:
- #50 should be possible to implement without changing the external graphql API
- we may also try alternative approaches to the API, e.g.
{ snapshot(timestamp: "2022-01-01") {...} }
or{ history(since: "2022-01-01") { ... } }
, or{ history(period: "7d") {...} }
(this can be done with or without #50) - if we implement #50 then I can also imagine there being fields with event-based changes for each question's field
NunoSempere commented
Beautiful!