Wrapping RESTful in GraphQL
Link Share :https://onetwo.ren/wrapping-restful-in-graphql/
- via RSS
Abstraction
From frontend dev aspect of view, GraphQL is a data layer paradigm that supports declarative Optimistic Update, fetch data following with use, data WYSIWYG, etc. It truly has some advantage above RESTful API, I’m going to introduce how to wrap existing RESTful API into a GraphQL API Gateway, without bothering backend dev, using an example that has been production tested.
Background
An outsourced project has some interesting relics, for example, it’s API usage:
import * as Mapi from '../../lib/Mapi'; // ... componentWillMount() { Mapi.districtPie(this.props.id) .then(json => { if (json.data.code === 0 && json.data.data !== undefined) {...
作者暂无likerid, 赞赏暂由本网站代持,当作者有likerid后会全部转账给作者(我们会尽力而为)。
Tips: Until now, everytime you want to store your article, we will help you store it in Filecoin network. In the future, you can store it in Filecoin network using your own filecoin.
Support author:
Author's Filecoin address:
Or you can use Likecoin to support author: