-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider GraphQL over REST API #8
Comments
It is also worth considering how IPLD selectors fit or whether they could be a better solution than REST or / and GraphQL |
E.g. #1 is perfect example of needing to batch which GraphQL supports out of the box. |
Would be good to run this idea by (a) Pinning Services (b) go-ipfs/js-ipfs Quick take: In this specific domain (simple CRUD for managing pins) I don't believe there will be use case for mixing operations (any examples?), but I agree that batching status checks would be useful (#1). Also, pagination is missing from v0.0.1 of the spec – filled #12 for tracking that separately. The old thread includes some feedback from @bonedaddy about representing this API over gRPC (Temporal looked into using |
I think there are some relevant questions asked here #2 (comment)
Once scheduler is introduced into the system batching of queued operations becomes relevant. For instance once node goes offline it may accumulate bunch of pin, delete, maybe even status requests and ability to fulfill them in a single request would be fairly convenient. However if each operation allowed batching of sorts win probably will be negligible, however nice thing about GraphQL is that it's all composable so you get batching for free with an ability to query specific fields.
I'm not familiar with gRPC and from a glance I do not really see a reason for creating gRPC layer just to add GraphQL over it, that is unless system already had a gRPC layer and GraphQL introduced a querying mechanism.
There are some case studies here https://www.graphql.com/case-studies/ Could you elaborate on what you mean by "easier or harder for harder for non-HTTP representations" GraphQL services are typically served over HTTP, that is not strictly necessary but I suspect pool of libraries to use with other transports to be smaller. |
Simplicity of REST API is great until:
Both lead to custom & non-composable solutions. For these reasons I would like to propose to consider https://graphql.org/ based API because:
The text was updated successfully, but these errors were encountered: