1. 首页
  2. 数据库
  3. 其它
  4. fe graphql demo 源码

fe graphql demo 源码

上传者: 2021-05-11 12:28:29上传 ZIP文件 227.01KB 热度 18次
fe-graphql-demo 有数派在前端中使用的 GraphQL 实践 Demo 由于 react 和 react-native 类似,所以 Demo 的示例使用的是 react-native ErrorLink / AuthLink Example AuthLink AuthLink 的使用场景在你想为你的 GraphQL 请求增加 header ,那么就需要添加 AuthLink ,根据不同的业务场景选择合适的你自己的方式 const authLink = setContext(async (req, { headers }) => { // get token from your store const token = await AsyncStorage.getItem('token'); // header 中带上 token 信息,及设定的 APP Device
下载地址
用户评论