Live data from Hacker News

Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why?

news.ycombinator.com

1–5 of 5 posts

Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why?

#1
* This would be assuming current technologies (or those that are likely to be usable in production in the next 3 to 6 months). * Want to be usable by a wide range of clients that may be outside of the control of the API creator. * Normal caveats about security, maintainability, etc. * Assume a Web API.

Edit: added assumption about Web API.

Re: Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why?

#3
post #2

Depends on what does it need to do, but you most probably will need a regular RPC instead of trivial CRUD (REST) or mostly data query (GraphQL). Though RPC is not fancy nor sexy, so most web developers this days won't even look at that.

The question is intentionally generic as I am trying to find out what most folks would do if they were starting with something fresh. Your comment reminded me I needed to narrow the focus a bit. I edited the question to add an assumption that this is a Web API.

Re: Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why?

#4
post #3
post #2

Depends on what does it need to do, but you most probably will need a regular RPC instead of trivial CRUD (REST) or mostly data query (GraphQL). Though RPC is not fancy nor sexy, so most web developers this days won't even look at that.

The question is intentionally generic as I am trying to find out what most folks would do if they were starting with something fresh. Your comment reminded me I needed to narrow the focus a bit. I edited the question to add an assumption that this is a Web API.

I don't know why did you get the impression that my comment somehow doesn't apply to API-first web services.

Re: Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why?

#5
post #4
post #3

Earlier quoted context omitted.

The question is intentionally generic as I am trying to find out what most folks would do if they were starting with something fresh. Your comment reminded me I needed to narrow the focus a bit. I edited the question to add an assumption that this is a Web API.

I don't know why did you get the impression that my comment somehow doesn't apply to API-first web services.

I didn't - it just reminded me that some might take it in a more general way than I intended. :)