4 ms·
Ask HN: For a greenfield public API which to use: REST, GraphQL, other? Why?
Context: This product is building built with the idea in mind that other developers will build new and interesting things with the API exposed to them
- itamarst 9y agoDepends on your use case. GraphQL is designed for the use case of a client talking over a thin long pipe that needs to talk to many APIs. As in, it's designed for API clients that are smartphones. And there are patent licensing issues with GraphQL.
- schickling 9y agoDefinitely GraphQL. Github, Shopify, Yelp and many more are now using GraphQL as their primary public API.
- davidwells 9y agoDo you any any examples of a company having ONLY a graphQL API for public use?
- PaulHoule 9y agoIt would help us answer the question if you told us more about your application.
- vasilakisfil 9y agoYou can use Introspected REST (https://introspected.rest https://introspected.rest) that allows you to fine-tune and balance between REST and GraphQL. No available libraries at the moment that can help you though so this could be a problem for your use case ;)