Javascript-React-Apollo-GraphQL-Ramda-Prisma

All In One


  • 首页

  • 标签

  • 分类

  • 归档

  • 站点地图

  • 搜索

Apollo|Stateful Links

发表于 2018-03-22 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 71 | 阅读时长 ≈ 1
Stateful Links某些 Link 需要在请求之间共享 state,从而完成额外的功能.Stateful links 总是重写ApolloLink 1234567891011121314import { ApolloLink } from 'apollo-link';class OperationCountLink extends ApolloLink { ...
阅读全文 »

摘要|Using Apollo with TypeScript

发表于 2018-03-16 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 330 | 阅读时长 ≈ 2
typescript 需要额外定义类型12345678910111213141516171819202122232425262728293031323334353637383940import React from "react";import gql from "graphql-tag";import { graphql } from "react-apollo";const ...
阅读全文 »

PokeMon datamodel

发表于 2018-03-16 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 138 | 阅读时长 ≈ 1
123456789101112type Trainer { id: String! name: String! ownedPokemons: [Pokemon] # 一个训练师有多个宠物}type Pokemon { id: String! url: String! name: String! trainer: Trainer # 一个宠物属于一个训练师 ...
阅读全文 »

The way to Typescript

发表于 2018-03-16 | 更新于: 2019-04-28 | 分类于 Init | 阅读次数:
字数统计: 5 | 阅读时长 ≈ 1
The init work to Typescript
阅读全文 »

摘要|Offline-First Web Application Using Redux and PouchDB

发表于 2018-03-12 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 363 | 阅读时长 ≈ 1
摘要|Offline-First Web Application Using Redux and PouchDB 5步构建离线优先web 应用 离线应用使用本地存储作为主要数据源, 数据不断和远程数据库同步为什么使用离线优先的模式?离线优先的应用有如下有点: 页面加载更高效 离线,在线工作状态没有区别 避免偶然的数据丢失. 使用 React,Redux和 PouchDB1.React和 ...
阅读全文 »

摘要|GraphQL Persisted Queries using GET Requests

发表于 2018-03-11 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 458 | 阅读时长 ≈ 2
原文:GraphQL Persisted Queries using GET Requests 摘要总结通过express 的中间件实现了 graphql Persisted Queries,在前端查询时使用的普通的GET请求,带有hash变量和具体变量, hash变量用于从服务器获取到对应的查询或者突变 schema,然后和具体的变量组合成真正的查询字符窜, 之后实施真正的 Graphql ...
阅读全文 »

摘要|How do GraphQL remote schemas work?

发表于 2018-03-10 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 1,087 | 阅读时长 ≈ 5
Understanding GraphQL schema stitching(part I)目的是使用已经有的 graphql API,通过我们自己的服务器暴露出来. 在配置阶段,我们只是简单的转发收到的GraphQL query 和 mutations. 负责转发这些操作的组件被称为 remote(executable)schema. Remote shcema 作为 schema stit ...
阅读全文 »

GraphQL|Github graphql API 文档示意

发表于 2018-03-09 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 729 | 阅读时长 ≈ 4
克隆 gitpoint 的项目 ,记录一下 GraphQL 的查询,就可以作为文档了. 按照 gitpoint 的 tab顺序来. 项目初衷, gitpoint 用的是 Redux,写的很好,功能也很完备,Redux的一个优点是单一数据来源.但是如果是远程数据, REST API 提供的数据, 却并不是单一来源的,而且每个远程请求的状态都要自己配置. 代码量太大. 使用 GraphQL的服务, ...
阅读全文 »

摘要|Functional Components with React stateless functions and Ramda

发表于 2018-03-08 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 1,926 | 阅读时长 ≈ 10
原文在这里. 有段时间不看了, 有些忘了,有些地方还有一定的加深. 什么是 React stateless function?es6的语法 12345class List extends React.Component { render() { return (<ul>{this.props.children}</ul> ...
阅读全文 »

Prisma|Native Authenticate Method

发表于 2018-03-06 | 更新于: 2019-04-28 | 分类于 技术备忘 | 阅读次数:
字数统计: 247 | 阅读时长 ≈ 1
针对以下的 schema1234567891011121314151617181920212223type Query { vehicles(dealership: ID!): [Vehicle!]!}type Mutation { updateVehicleAskingPrice(id: ID!, askingPrice: Int!): Vehicle} ...
阅读全文 »
1…456…14
React-Apollo

React-Apollo

base on javascript

136 日志
16 分类
90 标签
0%
© 2016 — 2019 React-Apollo | Site words total count: 190.2k