5 ms·
Has anybody found a way to combine GraphQL and REST in a common API? I've searched but so far found no idiomatic ways to accomplish that. The reason I need RES
by Svenstaro 9y ago
Has anybody found a way to combine GraphQL and REST in a common API? I've searched but so far found no idiomatic ways to accomplish that.
The reason I need REST in addition to GraphQL is that there are sometimes oddball cases where only GraphQL is a poor fit or where compatibility with older clients that I can't modify has to be ensured.
Also, is there a good way to do file upload of big files with GraphQL nowadays?
- Hendrixer 9y agoWe have @ https://tipe.io https://tipe.io. you can use rest and GraphQL. Basically, given a REST url, you dynamically create on graphql query on your server, and the execute that query against your schema. It's all meta
- Svenstaro 9y agoWasn't able to find a library or a Github or anything like that from a quick glance. I'm assuming this is a closed platform. What I was inquiring about was something that I can use in my own software.
- slimsag 9y agoYou seem to have misunderstood the parent here. They are saying that at their company, they are doing this (_not_ as a library or product you can purchase). Parent was saying that to implement it, they essentially wrote their REST API by grabbing a URL, dynamically creating a GraphQL query for it on their backend server, and then executing that query against their own GraphQL schema and returning the result.
- nowarninglabel 9y agoWhy do you believe you need to combine them? We have a REST API and GraphQL API. They both work well for their respective use cases and together satisfy our needs.
- Svenstaro 9y agoI would like to present them to the user as "here is our API" as opposed to "here are our somewhat complementing APIs and for the one you use these docs and do this and for the other one there's the docs here and you use it differently."
- atomashpolskiy 9y agoWe're developing a REST framework, which lets the client to shape response on a predetermined and constrained set of endpoints on the server. The client can include/exclude parts of the data (attributes and relationships), set filters and request aggregation. You may take a look: http://linkrest.io http://linkrest.io
- colept 9y agoYou can use directives to retrieve a REST API through GraphQL. For example: https://github.com/n1ru4l/graphql-schema-generator-rest https://github.com/n1ru4l/graphql-schema-generator-rest
- cvburgess 9y agoDuring a Q&A at GraphQL Summit, GitHub said that they are accomplishing this by making their REST endpoints use the GraphQL API instead of querying the data directly. They’ve been releasing the talks online slowly so that should be available soon.