redguava / cliniko-api

The API for Cliniko
74 stars 39 forks source link

GraphQL API #345

Open phil-lgr opened 3 years ago

phil-lgr commented 3 years ago

Somewhat related to #344

if you were to implement the API using GraphQL, we (all of your customers using the API) would have an auto-documented API along with types for each model.

I have been using GraphQL for over a year now, coming back to writing .d.ts files by hand is just brutal in comparison.

https://www.graphql-code-generator.com/ is just too good nowadays, graphql is such a boost in productivity, it can't be ignored by API authors

Any thoughts appreciated!

hagen commented 3 years ago

Hi @phil-lgr ,

thank you for your suggestion!

We have discussed other ways in which we could generate and present our API docs. There's a bit of work to do on our side to make this happen though, and it's almost always easier to spend that time on fixes and features! At this stage, we haven't considered reimplementing our API with GraphQL.

Without speaking for the whole organisation, we'd possibly lean towards something like OpenAPI… and leave the conversion to language-specific uses to developers. At least with a common standard, converting to models - or whatever the need is - could be automated. But nothing's set in stone yet, so thanks again for the suggestion! We'll definitely add it into the mix of ideas :+1: