Closed berekuk closed 2 years ago
Yes, I agree with you that having a GraphQL database makes sense. The current endpoints are are on alpha and it is fine to change them.
I'm fine just doing GraphQL. I don't see the API being massively used any time soon, really don't think both are necessary.
If we do #4 then API might not even be necessary right now (it's necessary for in-page operations, but not for the single page data fetching).
So, do we even want REST API if we expect to eventually grow to GraphQL (which is also self-documented, which is a nice bonus)?
I could implement a rudimentary GraphQL endpoint which covers everything from https://github.com/QURIresearch/metaforecast-api-server/blob/master/index.js in a day or two, in case we want to share any kind of API for third-party clients ASAP.
Supporting both REST and GraphQL is a possibility too, but more costly in maintenance in the long run. So this depends on how many API clients we're expecting to get and how much effort we can afford to put into making the life easier for them (things to consider: backward compatibility, documentation, feature parity between APIs and between an API and the website).